mirror of
https://github.com/actions/setup-go.git
synced 2026-10-07 11:53:00 +00:00
Reuse downloaded modules across Go versions, runner architectures, and runner images on the same OS instead of duplicating them in each build cache archive. Restore and save each entry independently, running operations in parallel when safe. Serialize restores for overlapping or aliased paths, preserve the original paths for the post step, and report cache-hit only when both entries match their primary keys. Update the documented manual restore keys and generated action bundles.
23 lines
391 B
TypeScript
23 lines
391 B
TypeScript
export enum State {
|
|
CacheEntries = 'CACHE_ENTRIES'
|
|
}
|
|
|
|
export enum Outputs {
|
|
CacheHit = 'cache-hit',
|
|
GoBinPath = 'go-bin-path'
|
|
}
|
|
|
|
export const GO_ENV_OUTPUTS = [
|
|
'GOPATH',
|
|
'GOBIN',
|
|
'GOROOT',
|
|
'GOCACHE',
|
|
'GOMODCACHE',
|
|
'GOOS',
|
|
'GOARCH',
|
|
'GOTOOLDIR'
|
|
] as const;
|
|
|
|
export type GoEnvVar = (typeof GO_ENV_OUTPUTS)[number];
|
|
export type GoEnv = Partial<Record<GoEnvVar, string>>;
|