diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e561a0a8..f5d599a0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -53,8 +53,9 @@ jobs: make check VERSION_FULL=${{ github.event.release.tag_name }}-${{ steps.short-sha.outputs.sha }} PRIVILEGE_LEVEL=${{ matrix.privilege-level }} env: REGISTRY_URL: localhost:5000 - - uses: actions/cache@v3 + - if: github.event_name == 'release' && github.event.action == 'published' + uses: actions/cache@v3 id: restore-build with: path: stacker - key: ${{ github.sha }} + key: ${{ github.event.release.tag_name }}-${{ steps.short-sha.outputs.sha }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3a7ec17a..b002c4d1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,11 +21,13 @@ jobs: # needs ci for the cached stacker binary needs: ci steps: + - uses: benjlevesque/short-sha@v2.1 + id: short-sha - uses: actions/cache@v3 id: restore-build with: path: stacker - key: ${{ github.sha }} + key: ${{ github.event.release.tag_name }}-${{ steps.short-sha.outputs.sha }} - if: github.event_name == 'release' && github.event.action == 'published' name: Publish artifacts on releases uses: svenstaro/upload-release-action@v2