Skip to content

Commit

Permalink
github: Avoid using the same key for saving cache
Browse files Browse the repository at this point in the history
A github cache can not be updated using the same key, so instead we update using a different key each time but use the same key to restore it.

Signed-off-by: hamistao <[email protected]>
  • Loading branch information
hamistao committed Nov 13, 2024
1 parent 7aba286 commit 425bda9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ jobs:
- name: Cache Trivy vulnerability database
if: ${{ steps.db_download.outcome == 'success' }}
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: /home/runner/vuln-cache
key: trivy-latest-cache
key: trivy-cache-${{ github.run_id }}
restore-keys: |
trivu-latest-cache
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
Expand Down

0 comments on commit 425bda9

Please sign in to comment.