Skip to content
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

Print installed version and environment info after installing #33

Closed
zikaeroh opened this issue Dec 14, 2019 · 11 comments
Closed

Print installed version and environment info after installing #33

zikaeroh opened this issue Dec 14, 2019 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@zikaeroh
Copy link

With allowed versions like 1.13.x, and potentially latest (#31) / tip (#21) in the future, I'd like to see the action print out the version it installed after it completes. Right now, you just get:

Run actions/setup-go@v1
  with:
    go-version: 1.12.x
/bin/tar xzC /home/runner/work/_temp/a019414e-aed8-4b3a-ab61-ad7003d09d12 -f /home/runner/work/_temp/8575e7d9-8f51-4d45-b8d0-0461f5b12f08
Added matchers: 'go'. Problem matchers scan action output for known warning or error strings and report these inline.

Which says nothing about what actually got installed.

Compare this to travis_setup_go, which will give you:

$ travis_setup_go
go version go1.13.5 linux/amd64
$ export GOPATH="/home/travis/gopath"
$ export PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.13.5.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin"
$ export GO111MODULE="on"
$ gimme version
v1.5.3
$ go version
go version go1.13.5 linux/amd64
$ go env
< snipped >

Or for tip:

$ travis_setup_go
go version devel +7d30af8e17 Fri Dec 13 20:41:04 2019 +0000 linux/amd64
$ export GOPATH="/home/travis/gopath"
$ export PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin"
$ export GO111MODULE="on"
$ gimme version
v1.5.3
$ go version
go version devel +7d30af8e17 Fri Dec 13 20:41:04 2019 +0000 linux/amd64
$ go env
< snipped >

Which gives much more information about the Go environment that the job used.

@bryanmacfarlane bryanmacfarlane self-assigned this Mar 27, 2020
@bryanmacfarlane
Copy link
Member

looking at this next

@bryanmacfarlane bryanmacfarlane added the enhancement New feature or request label Mar 27, 2020
@bryanmacfarlane
Copy link
Member

I fixed this. You can try it out in my branch:

 - uses: actions/setup-go@matcher

Here's what the output should look like:
Screen Shot 2020-03-31 at 10 41 42 AM

@ydnar
Copy link

ydnar commented Apr 1, 2020

@bryanmacfarlane would it be possible to add go-version to the action’s outputs, so subsequent steps (e.g. actions/cache) can use the current Go version as an input?

@bryanmacfarlane
Copy link
Member

@zikaeroh - this has been implemented in setup-go@v2-beta. Give it a try

@ydnar - downstream steps can simply run go version and/or which go

@bryanmacfarlane
Copy link
Member

Closing since implement. Let me know if you have issues with v2-beta

@sagikazarmark
Copy link

sagikazarmark commented Apr 3, 2020

@bryanmacfarlane the original post also mentioned the output of go env which is commonly a requested detail in bug reports.

I might be mistaken, but it looks like that hasn't been added. Is that on purpose?

@bryanmacfarlane
Copy link
Member

I'll add it under an expando in the logs

@sagikazarmark
Copy link

sagikazarmark commented Apr 3, 2020

Thanks!

@bryanmacfarlane
Copy link
Member

@sagikazarmark - here ya go. in master now. I'll push to v2-beta

Screen Shot 2020-04-06 at 8 44 54 AM

@sagikazarmark
Copy link

Awesome, thank you! 🎉

@bryanmacfarlane
Copy link
Member

available in setup-go@v2-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants