Skip to content

Commit 52e232c

Browse files
fix: use actions/cache for all caching needs
Due to how you cannot pass in a cache key to actions/go-setup, we cannot reliably use the cache produced by this action. See issue for more info: actions/setup-go#358
1 parent 4774ed3 commit 52e232c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

actions/setup/action.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ inputs:
1717
required: false
1818
default: '1.22'
1919

20-
cache-dependency-path:
21-
description: Path to the go.sum file(s) to use in caching.
22-
required: false
23-
default: go.sum
24-
2520
check-latest:
2621
description: If true, checks whether the cached go version is the latest, if not then downloads the latest. Useful when you need to use the latest version.
2722
required: false
@@ -46,8 +41,7 @@ runs:
4641
with:
4742
go-version: ${{ inputs.go-version }}
4843
check-latest: ${{ inputs.check-latest }}
49-
cache: ${{ inputs.disableCache != 'true' }}
50-
cache-dependency-path: ${{ inputs.cache-dependency-path }}
44+
cache: false # cache is handled by separate actions/cache step.
5145

5246
- name: Cache sage folders
5347
if: ${{ inputs.disableCache != 'true' }}
@@ -56,6 +50,9 @@ runs:
5650
path: |
5751
./.sage/tools
5852
./.sage/bin
53+
/home/runner/.cache/go-build
54+
/home/runner/go/pkg/mod
55+
/home/runner/go/bin
5956
key: ${{ runner.os }}-sage-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}-${{ hashFiles('./.sage/go.sum') }}
6057
restore-keys: |
6158
${{ runner.os }}-sage-${{ github.workflow }}-${{ github.job }}-${{ inputs.cacheKey }}-${{ inputs.go-version }}-

0 commit comments

Comments
 (0)