Skip to content

Commit efe6165

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 efe6165

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

actions/setup/action.yml

Lines changed: 5 additions & 8 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,16 +41,18 @@ 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

52-
- name: Cache sage folders
46+
- name: Set up cache
5347
if: ${{ inputs.disableCache != 'true' }}
5448
uses: actions/cache@v4
5549
with:
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)