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

.github/workflows: Use new setup-go go-version-file input #65

Merged
merged 7 commits into from May 31, 2022

Conversation

bflad
Copy link
Member

@bflad bflad commented May 12, 2022

@bflad bflad added the github_actions Pull requests that update GitHub Actions code label May 12, 2022
@bflad bflad requested a review from a team as a code owner May 12, 2022 17:16
@bflad
Copy link
Member Author

bflad commented May 12, 2022

Hmm. Going to debug actionlint to see if there's hardcoded information inside it and raise an issue if necessary. https://github.com/actions/setup-go/blob/v3/action.yml has the new input correctly.

@bflad
Copy link
Member Author

bflad commented May 12, 2022

Issue: rhysd/actionlint#139
Potential fix: rhysd/actionlint#140

@radeksimko
Copy link
Member

FYI the new setting should also support reading .go-version - unsure if you intend to test against latest compatible version or the same version that you likely end up developing with locally (assuming you have goenv installed).

@bflad
Copy link
Member Author

bflad commented May 13, 2022

@radeksimko thanks for the nudge here -- I was actually looking to also remove .go-version files as part of this. I think the terraform-plugin-* projects are fine with CI/releases using the latest patch version as defined by the minor version in go.mod. I don't think anyone on the maintainers team uses goenv, but maybe that's a feature request that needs to be submitted to that project if it is not already supported functionality.

@detro
Copy link
Contributor

detro commented May 18, 2022

goenv user here :)

That said, I'm not in love with the idea of a go.mod and a .go-version, but no tool seems to just read the information out of go.mod for some absurd reason.

@bflad
Copy link
Member Author

bflad commented May 18, 2022

Good to know, @detro! If you'd like to keep the goenv specific handling around, please reach out. It's always been a pain to keep the .go-version up to date since as far as I know, there's not a way to handle it via dependabot.

actionlint is now happy with the new actions/setup-go go-version-file input and according to the last two commits, it seems to work as expected with either go.mod or .go-version.

@detro
Copy link
Contributor

detro commented May 18, 2022

The only reason I like .go-version and goenv is that we deal with a lot of repositories, and they are never going to be all in sync with the version of Go to use. So .go-version helps with that.

Otherwise I'd be glad to just rely on go.mod.

And, look: go-nv/goenv#121 - Someone we know opened that exact issue ;)

Copy link
Contributor

@detro detro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to apply a 👍 to this, sorry

@bflad bflad added this to the v0.5.0 milestone May 31, 2022
@bflad bflad merged commit ea82e49 into main May 31, 2022
@bflad bflad deleted the bflad-setup-go-file branch May 31, 2022 18:11
@bflad bflad modified the milestones: v0.5.0, v0.4.1 Jun 6, 2022
@github-actions
Copy link

github-actions bot commented Jul 7, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants