Preserve native Go environment names in action outputs (#793)

* preserve native Go environment names in action outputs

* implement review comment

* Add missing trailing newline to action.yml

---------

Co-authored-by: mahabaleshwars <147705296+mahabaleshwars@users.noreply.github.com>
This commit is contained in:
v-mahabaleshwars
2026-09-25 21:05:28 +05:30
committed by GitHub
parent e626ada899
commit 3bfff43db6
8 changed files with 93 additions and 101 deletions

View File

@@ -5,13 +5,19 @@ export enum State {
export enum Outputs {
CacheHit = 'cache-hit',
GoPath = 'go-path',
GoBin = 'go-bin',
GoBinPath = 'go-bin-path',
GoRoot = 'go-root',
GoCache = 'go-cache',
GoModCache = 'go-mod-cache',
GoOs = 'go-os',
GoArch = 'go-arch',
GoToolDir = 'go-tool-dir'
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>>;