-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JSON output of go env
and some env as strings
#334
base: main
Are you sure you want to change the base?
Conversation
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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
What needs to be done to get this merged? |
Description:
Additional outputs are:
go-path
string- GOROOT asgo-root
stringgo-mod
stringgo-cache
stringgo-mod-cache
stringgo env
asgo-env
JSONRelated issue:
Closes #54
Check list: