Skip to content

Commit 0bc9732

Browse files
committed
chore: increment GOCACHE key
It seems like this just boundlessly grows. Right now it's `~3535 MB (3707029742 B)`. Another alternative is to just remove this entirely since I really doubt this helps much, but this seems to be the easiest for now.
1 parent 4456d0b commit 0bc9732

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,16 @@ runs:
4848
with:
4949
path: |
5050
${{ env.GOCACHE }}
51-
# Job name must be included in the key for effective
52-
# test cache reuse.
51+
# Job name must be included in the key for effective test cache reuse.
5352
# The key format is intentionally different than GOMODCACHE, because any
54-
# time a Go file changes we invalidate this cache, whereas GOMODCACHE
55-
# is only invalidated when go.sum changes.
56-
key: gocache-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.go', 'go.**') }}
53+
# time a Go file changes we invalidate this cache, whereas GOMODCACHE is
54+
# only invalidated when go.sum changes.
55+
# The number in the key is incremented when the cache gets too large,
56+
# since this technically grows without bound.
57+
key: gocache2-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.go', 'go.**') }}
5758
restore-keys: |
58-
gocache-${{ runner.os }}-${{ github.job }}-
59-
gocache-${{ runner.os }}-
59+
gocache2-${{ runner.os }}-${{ github.job }}-
60+
gocache2-${{ runner.os }}-
6061
6162
- name: Install gotestsum
6263
shell: bash

0 commit comments

Comments
 (0)