Skip to content

Commit 80f9c6c

Browse files
authored
Use a hash of the docker folder as a key to GHA cache (#1001)
This should be the only thing impacting docker cache.
1 parent 54e0e9d commit 80f9c6c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,11 @@ jobs:
5151
- name: Set up Docker Buildx
5252
uses: docker/setup-buildx-action@v1
5353

54-
- name: Create cache timestamp
55-
id: timestamp
56-
run: echo "::set-output name=timestamp::$(python3 -c 'from datetime import datetime,timezone; print(datetime.now(timezone.utc).isoformat())')"
57-
5854
- name: Setup cache
5955
uses: actions/cache@v2
6056
with:
6157
path: .buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
62-
key: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}-${{ steps.timestamp.outputs.timestamp }}
58+
key: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}-${{ hashFiles('docker/**') }}
6359
restore-keys: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}-
6460

6561
- name: Build

0 commit comments

Comments
 (0)