Add JSON output of go env and some env as strings#334
Add JSON output of go env and some env as strings#334lucacome wants to merge 1 commit intoactions:mainfrom
go env and some env as strings#334Conversation
801d939 to
e5fda20
Compare
|
@marko-zivic-93 could you approve the CI run again? 🙏 |
|
Not really sure why it failed basic validation on windows...maybe a flaky test? |
7d76f7a to
2c81452
Compare
|
I'm also thinking that it would be nicest if we could use the exact same names that I would personally expose each one of them as-is, uppercase and all, like |
|
Thanks for catching that @mvdan I've added As for the naming, I was using the same pattern used in the other variables, but I'm happy to change them if people think that's a better approach. As for exposing all of them, I didn't want to pollute the outputs and I'm not sure how we could auto-generate them... 😅 Some guidance from the maintainers would be appreciated 🙏 |
|
is there anything I can do to get this PR reviewed? |
|
cc @dmitry-shibanov :) |
|
Duplicate of # |
| core.setOutput('go-root', goEnvJson['GOROOT']); | ||
| core.setOutput('go-cache', goEnvJson['GOCACHE']); | ||
| core.setOutput('go-mod-cache', goEnvJson['GOMODCACHE']); | ||
| core.setOutput('go-env', goEnvJson); |
There was a problem hiding this comment.
Hello @lucacome
Can you please remove the most outputs except these 3 ones
core.setOutput('go-version', parsedGoVersion);
core.setOutput('go-cache', goEnvJson['GOCACHE']);
core.setOutput('go-mod-cache', goEnvJson['GOMODCACHE']);
The others does not seem relate to any real-world use cases.
There was a problem hiding this comment.
Hi @dsame
I'm personally interested in go-path so I would like to keep that one as well 😅
Are you saying to also remove core.setOutput('go-env', goEnvJson); ?
There was a problem hiding this comment.
I'm still of the opinion that the entire go env -json should be exposed in its entirety - I find most of the vars useful.
|
What needs to be done to get this merged? |
|
What is the status of this? |
Additional outputs are: - GOPATH as `go-path` string - GOMOD as `go-mod` string - GOCACHE as `go-cache` string - GOMODCACHE as `go-mod-cache` string - `go env` as `go-env` JSON
Description:
Additional outputs are:
go-pathstring- GOROOT asgo-rootstringgo-modstringgo-cachestringgo-mod-cachestringgo envasgo-envJSONRelated issue:
Closes #54
Check list: