Skip to content

Commit 2c7208a

Browse files
committed
fixup! Reduce thrashing
1 parent cc87000 commit 2c7208a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/actions/setup-go/action.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ runs:
2727
id: get_cache_dirs
2828
shell: bash
2929
run: |
30-
echo "::set-output name=go-mod-cache::$(go env GOMODCACHE)"
31-
echo "::set-output name=go-cache::$(go env GOCACHE)"
30+
echo "go-mod-cache=$(go env GOMODCACHE)" >> $GITHUB_ENV
31+
echo "go-cache=$(go env GOCACHE)" >> $GITHUB_ENV
32+
3233
# We split up GOMODCACHE from GOCACHE because the latter must be invalidated
3334
# on code change, but the former can be kept.
3435
- name: Cache $GOMODCACHE
3536
uses: buildjet/cache@v3
3637
with:
3738
path: |
38-
${{ steps.get_cache_dirs.outputs.go-mod-cache }}}
39+
${{ env.GOMODCACHE }}}
3940
key: gomodcache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-${{ github.job }}
4041
restore-keys: |
4142
gomodcache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-
@@ -45,7 +46,7 @@ runs:
4546
uses: buildjet/cache@v3
4647
with:
4748
path: |
48-
${{ steps.get_cache_dirs.outputs.go-cache }}}
49+
${{ env.GOCACHE }}}
4950
# Job name must be included in the key for effective
5051
# test cache reuse.
5152
key: gocache-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.go', 'go.**') }}

0 commit comments

Comments
 (0)