Skip to content

Commit 3f4544d

Browse files
committed
chore: Enable caching for Bazel and Go dependencies in GitHub Actions workflow
1 parent 3d6253e commit 3f4544d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/build-tf.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,29 @@ jobs:
2727
- name: Checkout
2828
uses: actions/checkout@v4
2929

30+
- name: Cache Bazel
31+
uses: actions/cache@v4
32+
with:
33+
path: |
34+
~/.cache/bazel
35+
~/.cache/bazelisk
36+
key: ${{ runner.os }}-bazel-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE') }}
37+
restore-keys: |
38+
${{ runner.os }}-bazel-
39+
3040
- name: Setup bazel
3141
uses: ./.github/actions/setup_bazel_nix
3242
with:
3343
useCache: "false"
3444

45+
- name: Cache Go dependencies
46+
uses: actions/cache@v4
47+
with:
48+
path: ~/go/pkg/mod
49+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
50+
restore-keys: |
51+
${{ runner.os }}-go-
52+
3553
- name: Build Terraform Provider Binary
3654
uses: ./.github/actions/build_tf_provider
3755
with:

0 commit comments

Comments
 (0)