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

Migrate github actions workflows to use actions/setup-go go-version-file input #24937

Closed
anGie44 opened this issue May 23, 2022 · 2 comments · Fixed by #25089
Closed

Migrate github actions workflows to use actions/setup-go go-version-file input #24937

anGie44 opened this issue May 23, 2022 · 2 comments · Fixed by #25089
Labels
enhancement Requests to existing resources that expand the functionality or scope. github_actions Pull requests that update Github_actions code technical-debt Addresses areas of the codebase that need refactoring or redesign.

Comments

@anGie44
Copy link
Contributor

anGie44 commented May 23, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

  • Across many of our workflows we setup the go version with following environment variable setup:
 # See also: https://github.com/actions/setup-go/pull/62
    - run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
    - uses: actions/setup-go@v3
      with:
        go-version: ${{ env.GO_VERSION }}
    # See also: https://github.com/actions/setup-go/issues/54

But as of a recent release in actions-setup/go as suggested by @gdavison , this can be accomplished directly as seen in their github release of v3.1.0 e.g.

steps:
 - uses: actions/checkout@v3
 - uses: actions/setup-go@v3
   with:
     go-version-file: 'path/to/go.mod'
 - run: go version

References

@anGie44 anGie44 added enhancement Requests to existing resources that expand the functionality or scope. technical-debt Addresses areas of the codebase that need refactoring or redesign. github_actions Pull requests that update Github_actions code labels May 23, 2022
@anGie44
Copy link
Contributor Author

anGie44 commented May 23, 2022

Relates: hashicorp/terraform-plugin-log#65

@github-actions
Copy link

github-actions bot commented Jul 7, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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
enhancement Requests to existing resources that expand the functionality or scope. github_actions Pull requests that update Github_actions code technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant