-
Notifications
You must be signed in to change notification settings - Fork 23
ci: fix go version to that defined in go.mod #438
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
Conversation
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
go-version: "1.24.2" |
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.
Why do these need this to be in sync? IIRC Go will run as the version defined in go.mod
even if it's a lower version. Higher version of course takes precedence.
See:
~
❯ go1.23.7 version
go version go1.23.7 darwin/arm64
~/Code/coder main*
❯ go1.23.7 version
go version go1.24.6 darwin/arm64
Btw, go.mod
says 1.24.6
.
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.
The actions/setup-go
action has a breaking change:
Breaking Changes
Improve toolchain handling to ensure more reliable and consistent toolchain selection and management by [@matthewhughes934](https://github.com/matthewhughes934) in [actions/setup-go#460](https://redirect.github.com/actions/setup-go/pull/460)
see #437
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.
Ah, gotcha, so they're preventing that behavior now.
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.
#439 stacked the original PR on top and it's green ✅
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.
Ignore my comment about 1.24.6 btw, originally thought this was a PR to coder/coder repo 😄
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.
Some small suggestions/improvements but otherwise LGTM. Thanks for adding the --fix
option!
Ref: #437
Our version of Go we reference in our
.github/**
doesn't match that ingo.mod
.To fix this, I've updated the version of Go and added a check to ensure they're all in sync.
Disclaimer: Most of the script was generated by ChatGPT but I went over it before committing.