From 897156ad5b5f7ccdfc0b4419fd8473bb054a89ec Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:25:42 -0700 Subject: [PATCH] Workaround not allowing if: within composite actions --- .github/actions/toolchain-build/action.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 5994546b..f05b5be8 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -14,29 +14,21 @@ runs: run: .github/scripts/create-hash.sh shell: bash - - name: Generate keys - id: genkey - run: | - echo "::set-output name=riscvtools-cache-key::riscv-tools-installed-${{ env.tools-cache-version }}-$(shasum riscv-tools.hash | cut -d' ' -f1)" - echo "::set-output name=esptools-cache-key::esp-tools-installed-${{ env.tools-cache-version }}-$(shasum esp-tools.hash | cut -d' ' -f1)" - shell: bash - # brute force way to swap between riscv/esp-tools caches - name: Cache riscv-tools - if: ${{ inputs.tools-version == "riscv-tools" }} uses: actions/cache@v2 id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install - key: ${{ steps.genkey.outputs.riscvtools-cache-key }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(riscv-tools.hash) }} + # brute force way to swap between riscv/esp-tools caches - name: Cache esp-tools - if: ${{ inputs.tools-version == "esp-tools" }} uses: actions/cache@v2 id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install - key: ${{ steps.genkey.outputs.esptools-cache-key }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(esp-tools.hash) }} - name: Build toolchain if not cached run: |