Skip to content

Commit

Permalink
use partial restore key in github action
Browse files Browse the repository at this point in the history
We use a unique hash key on each run, this ensures the cache gets
rewritten on each run. The partial restore then loads the newest key on
the next run.
  • Loading branch information
splitbrain committed Sep 2, 2024
1 parent ca8970c commit bc02934
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
uses: actions/cache@v4
with:
path: .github/matrix.cache/
key: ${{ runner.os }}-matrix-${{ hashFiles('.github/matrix.php') }}
key: ${{ runner.os }}-matrix-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-matrix-
- name: Set up matrix
id: set-matrix
run: |
Expand Down

0 comments on commit bc02934

Please sign in to comment.