mirror of https://github.com/actions/setup-go.git
dependabot/npm_and_yarn/fast-xml-parser-5.7.1
dependabot/npm_and_yarn/actions/cache-5.0.3
main
dependabot/npm_and_yarn/types/node-25.0.9
dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-8.53.1
dependabot/npm_and_yarn/typescript-eslint/parser-8.53.1
releases/v5
restore-v4-release
Testv5
dependabot/npm_and_yarn/eslint-config-prettier-10.1.8
dependabot/npm_and_yarn/nock-14.0.10
node24-fix
node24
test-macos-x64-runner
add-publish-immutable-actions
restore-v3-release
thboop/node16update
releases/v1
master
goenv
matcher
binpath
v2-proxy
ethomson/update_description
v1
v2-beta
v1.0.0
v1.0.1
v1.0.2
v1.1.0
v1.1.1
v1.1.2
v1.1.3
v2
v2.0.1
v2.0.2
v2.0.3
v2.1.0
v2.1.1
v2.1.2
v2.1.3
v2.1.4
v2.1.5
v2.2.0
v3
v3.0.0
v3.1.0
v3.2.0
v3.2.1
v3.3.0
v3.3.1
v3.4.0
v3.5.0
v3.6.0
v3.6.1
v4
v4.0.0
v4.0.1
v4.1.0
v4.2.0
v4.2.1
v4.3.0
v5
v5.0.0
v5.0.1
v5.0.2
v5.1.0
v5.2.0
v5.3.0
v5.4.0
v5.5.0
v5.6.0
v6
v6.0.0
v6.1.0
v6.2.0
v6.3.0
v6.4.0
${ noResults }
1 Commits (49fe0b8fccf1a76d6e86bee6d787acf41437cac0)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
49fe0b8fcc
|
fix: allow multiple invocations with caching enabled
This fix addresses the issue where calling setup-go multiple times with
caching enabled in the same workflow would fail because the second
invocation attempted to save to the same cache key.
Changes:
- Add tracking of processed cache keys using state variables to prevent
duplicate cache save attempts
- Add helper functions in constants.ts for state management:
- getAlreadyCachedKey()/setAlreadyCachedKey(): Track keys already in cache
- getPrimaryCacheKey()/setPrimaryCacheKey(): Track the primary key for
each invocation
- getCachedGoModPath()/setCachedGoModPath(): Track which go.mod was cached
- Modify cache-restore.ts to store state about the cache operation
- Modify cache-save.ts to check if cache was already saved for this
go.mod path before attempting to save again
- Add comprehensive tests for the multiple invocation scenario
This enables workflows that need to setup Go with different configurations
(e.g., different working directories) multiple times without cache
conflicts.
Assisted-By: cagent
|
2 months ago |