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 Action Homebrew authorization scope documentation #58

Closed
tanelmae opened this issue Dec 5, 2019 · 5 comments
Closed

Github Action Homebrew authorization scope documentation #58

tanelmae opened this issue Dec 5, 2019 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@tanelmae
Copy link

tanelmae commented Dec 5, 2019

Writing this in free form as I don't think it fits well with the template.

Github Action documentation tells people to use predefined GITHUB_TOKEN secret.

env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

That secret is set by Github and the token's permissions are limited to the repository that contains your workflow.

While this is enough to publish repository releases, it is not enough if changes need to be made in another repository. I would expect that is the common case when using goreleaser to publish to Homebrew taps.
To make it work, user can create access token with correct scope manually and adding as a secret in the repository with goreleaser Github Action.

env:
          GITHUB_TOKEN: ${{ secrets. GORELEASER_GITHUB_TOKEN }}

This was mentioned in the documentation in 6809172 but removed in a7f049e
This should be somehow covered in the Github Action documentation.

It would be nice if Github would allow more fine grained control over the scope of the generated GITHUB_TOKEN secret. But this is how it works for now.

@stale
Copy link

stale bot commented Dec 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@caarlos0
Copy link
Member

cc/ @crazy-max

@crazy-max crazy-max transferred this issue from goreleaser/goreleaser Dec 24, 2019
@crazy-max
Copy link
Member

Hi @tanelmae, feel free to open a PR to enhance the documentation in the README. Thanks

@crazy-max crazy-max added the documentation Improvements or additions to documentation label Dec 24, 2019
@arvenil
Copy link

arvenil commented Apr 26, 2020

I just spent an hour trying to figure out why it doesn't work. Thank you for this open issue! I'm new with github actions and didn't realize token is limited to just current repo.

@crazy-max
Copy link
Member

Notes have been added about this limitation: https://github.com/goreleaser/goreleaser-action#limitation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants