Skip to content

Commit 29458a0

Browse files
authored
Separate caches
1 parent 4f92f3e commit 29458a0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/main.yml

+23
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,29 @@ jobs:
1919
go-version: "1.20.x"
2020
cache: false
2121

22+
- name: Get Go cached paths
23+
run: |
24+
echo "cache=$(go env GOCACHE)" >> $GITHUB_ENV
25+
echo "modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
26+
27+
- name: Set up dependencies cache
28+
uses: actions/cache@v3
29+
with:
30+
path: |
31+
${{ env.cache }}
32+
key: setup-go-deps-${{ hashFiles('go.sum go.mod') }}
33+
restore-keys: |
34+
setup-go-deps-
35+
36+
- name: Set up intermediate built files cache
37+
uses: actions/cache@v3
38+
with:
39+
path: |
40+
${{ env.modcache }}
41+
key: setup-go-build-${{ hashFiles('**/*.go') }}
42+
restore-keys: |
43+
setup-go-build-
44+
2245
- name: get
2346
run: |
2447
go get

0 commit comments

Comments
 (0)