-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Action failing with latest golang:alpine
image
#5
Comments
3 tasks
Hey @caitlinelfring, good catch and a very informative description. Indeed, |
andrewslotin
added a commit
that referenced
this issue
Mar 21, 2022
Since go1.18 the behavior of `go get` has changed to operate within module context only. In case there is no `go.mod` present in the current directory, command returns with a non-zero status, which terminates the execution and fails the action. To address this issue we're going to init a dummy module before running `go get`, which will add the target package to the `go.mod` and download it via proxy. The change should be backward-compatible with older Go versions that have module support. Closes #5
Please give |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
I discovered this failing in the latest
golang:alpine
image that's used in this action - example. I haven't run this action in a while, butgolang:alpine
is now go 1.18. Testing this action locally withgolang:1.17-alpine
works as expected.From the changelog of 1.18 - https://tip.golang.org/doc/go1.18#go-get
go get
is still the recommended way to update a package https://pkg.go.dev/about#adding-a-packageWondering if you might have a recommendation for how to move forward. My workaround is to run the commands in this action myself so I can force go 1.17.
Thanks for your help!
The text was updated successfully, but these errors were encountered: