Skip to content

Commit 27d4a40

Browse files
HoloRinmergify[bot]
authored andcommitted
Fix github actions cache key for the bazel repo-cache
(cherry picked from commit 204d017)
1 parent 16c7a9b commit 27d4a40

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

.github/workflows/test-mixed-versions.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ jobs:
135135
uses: actions/[email protected]
136136
with:
137137
path: "/home/runner/repo-cache/"
138-
key: repo-cache
138+
key: ${{ runner.os }}-repo-cache-${{ hashFiles('MODULE.bazel','WORKSPACE','bazel/bzlmod/secondary_umbrella.bzl') }}
139+
restore-keys: |
140+
${{ runner.os }}-repo-cache-
139141
- name: CONFIGURE BAZEL
140142
run: |
141143
if [ -n "${{ secrets.BUILDBUDDY_API_KEY }}" ]; then
@@ -183,7 +185,9 @@ jobs:
183185
uses: actions/[email protected]
184186
with:
185187
path: "/home/runner/repo-cache/"
186-
key: repo-cache
188+
key: ${{ runner.os }}-repo-cache-${{ hashFiles('MODULE.bazel','WORKSPACE','bazel/bzlmod/secondary_umbrella.bzl') }}
189+
restore-keys: |
190+
${{ runner.os }}-repo-cache-
187191
- name: CONFIGURE BAZEL
188192
run: |
189193
ERLANG_HOME="$(dirname $(dirname $(which erl)))"

.github/workflows/test-selenium.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ jobs:
5050
uses: actions/[email protected]
5151
with:
5252
path: "/home/runner/repo-cache/"
53-
key: repo-cache
53+
key: ${{ runner.os }}-repo-cache-${{ hashFiles('MODULE.bazel','WORKSPACE','bazel/bzlmod/secondary_umbrella.bzl') }}
54+
restore-keys: |
55+
${{ runner.os }}-repo-cache-
5456
5557
- name: Configure Bazel
5658
run: |

.github/workflows/test.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ jobs:
4444
uses: actions/[email protected]
4545
with:
4646
path: "/home/runner/repo-cache/"
47-
key: repo-cache
47+
key: ${{ runner.os }}-repo-cache-${{ hashFiles('MODULE.bazel','WORKSPACE','bazel/bzlmod/secondary_umbrella.bzl') }}
48+
restore-keys: |
49+
${{ runner.os }}-repo-cache-
4850
- name: CONFIGURE BAZEL
4951
run: |
5052
if [ -n "${{ secrets.BUILDBUDDY_API_KEY }}" ]; then
@@ -96,7 +98,9 @@ jobs:
9698
uses: actions/[email protected]
9799
with:
98100
path: "/home/runner/repo-cache/"
99-
key: repo-cache
101+
key: ${{ runner.os }}-repo-cache-${{ hashFiles('MODULE.bazel','WORKSPACE','bazel/bzlmod/secondary_umbrella.bzl') }}
102+
restore-keys: |
103+
${{ runner.os }}-repo-cache-
100104
- name: CONFIGURE BAZEL
101105
run: |
102106
ERLANG_HOME="$(dirname $(dirname $(which erl)))"

0 commit comments

Comments
 (0)