Skip to content

Commit 9b4015b

Browse files
committed
Use built-in cache in the setup-go action
1 parent 45b4299 commit 9b4015b

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/01-default.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,18 @@ jobs:
2727
with:
2828
go-version: ${{ matrix.go_version }}
2929
check-latest: true
30+
cache: true
31+
cache-dependency-path: 'go.sum'
3032

31-
- name: Cache Go Modules
32-
uses: actions/cache@v4
33-
with:
34-
path: |
35-
~/go/pkg/mod
36-
~/.cache/go-build
37-
key: go-${{ matrix.go_version }}-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
38-
restore-keys: |
39-
go-${{ matrix.go_version }}-${{ runner.os }}-
33+
# - name: Cache Go Modules
34+
# uses: actions/cache@v4
35+
# with:
36+
# path: |
37+
# ~/go/pkg/mod
38+
# ~/.cache/go-build
39+
# key: go-${{ matrix.go_version }}-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
40+
# restore-keys: |
41+
# go-${{ matrix.go_version }}-${{ runner.os }}-
4042

4143
- name: Check Go version
4244
run: go version

0 commit comments

Comments
 (0)