Skip to content

Commit 90eaba9

Browse files
committed
save unique cache
1 parent cb8fad9 commit 90eaba9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ jobs:
4848
if: success()
4949
with:
5050
path: ~/docker-cache/docker.tar
51-
key: docker-${{ runner.os }}-zilla-develop-SNAPSHOT
51+
key: zilla-develop-SNAPSHOT-${{ hashFiles('~/docker-cache/docker.tar') }}
52+
53+
- name: Compute Unique Cache Key
54+
id: cache-key
55+
run: echo "cache_key=zilla-develop-SNAPSHOT-${{ hashFiles('~/docker-cache/docker.tar') }}" >> "$GITHUB_OUTPUT"
5256

5357
- name: Conditional Artifact Upload
5458
uses: actions/upload-artifact@v4
@@ -105,7 +109,7 @@ jobs:
105109
uses: actions/cache@v4
106110
with:
107111
path: ~/docker-cache/docker.tar
108-
key: docker-${{ runner.os }}-zilla-develop-SNAPSHOT
112+
key: ${{ needs.build.outputs.cache_key }}
109113

110114
- name: Load cached Docker image
111115
run: |

0 commit comments

Comments
 (0)