create new cache key on each run when saving previous commit hash (#3898)

* create new cache key on each run

* dynamic restore-key
zio/stable
Hailey 2024-05-07 13:08:44 -07:00 committed by GitHub
parent c6d30f671a
commit 0658dd053d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-deploy group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-deploy
cancel-in-progress: false cancel-in-progress: true
outputs: outputs:
fingerprint-is-different: ${{ steps.fingerprint-debug.outputs.fingerprint-is-different }} fingerprint-is-different: ${{ steps.fingerprint-debug.outputs.fingerprint-is-different }}
@ -54,7 +54,9 @@ jobs:
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: last-successful-commit-hash.txt path: last-successful-commit-hash.txt
key: last-successful-deployment-commit-${{ github.ref_name }} key: last-successful-deployment-commit-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
last-successful-deployment-commit-${{ github.ref_name }}-
- name: Add the last successful deployment commit to the output - name: Add the last successful deployment commit to the output
id: last-successful-commit id: last-successful-commit