Skip to content

Commit 808cd70

Browse files
authored
Merge pull request #392 from camptocamp/cache-key
Fix cache keys
2 parents 6f20b71 + 031a55d commit 808cd70

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/main.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,23 @@ jobs:
4343
uses: actions/cache@v2
4444
with:
4545
path: /tmp/docker/cache
46-
key: docker-cache-${{ github.base_ref }}-${{ github.run_id }}
46+
key: docker-cache-${{ github.base_ref }}-${{ github.head_ref }}-${{ github.run_id }}
4747
restore-keys: |
4848
docker-cache-${{ github.base_ref }}-${{ github.head_ref }}-
4949
docker-cache-${{ github.base_ref }}-
50+
docker-cache-master-
5051
docker-cache-
5152
docker-cache
5253
if: github.event_name == 'pull_request'
5354
- name: Cache
5455
uses: actions/cache@v2
5556
with:
5657
path: /tmp/docker/cache
57-
key: docker-cache-${{ github.head_ref }}-${{ github.run_id }}
58+
key: docker-cache-${{ github.ref_name }}-${{ github.ref_name }}-${{ github.run_id }}
5859
restore-keys: |
59-
docker-cache-${{ github.head_ref }}-${{ github.head_ref }}-
60-
docker-cache-${{ github.head_ref }}-
60+
docker-cache-${{ github.ref_name }}-${{ github.ref_name }}-
61+
docker-cache-${{ github.ref_name }}-
62+
docker-cache-master-
6163
docker-cache-
6264
docker-cache
6365
if: github.event_name == 'push'

0 commit comments

Comments
 (0)