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

Set permissions to github workflows #412

Merged
merged 2 commits into from
Mar 17, 2023
Merged

Conversation

joycebrum
Copy link
Contributor

Changes

Closes #411

  • set permission to build.yml to contents read. Success run example: https://github.com/joycebrum/x86_64/actions/runs/4451339527
  • set top level permission of release.yml to contents: read and grant contents: write on the job level. Considering the parmission to read on crates, I could not test it completely (although it had run with success on my fork). But considering that the GITHUB_TOKEN would basically be used to the POST on refs, the contents: write is enough.

Thanks and let me know if I missed anything.

@josephlr
Copy link
Contributor

This looks reasonable. The only github permission needed for the release script is to tag the release. It seems like actions don't support restricting a token to specific content APIs, so we have to allow "write" for all content. This seems fine though.

We will see if this break stuff on the next release, but it shouldn't.

Thanks for the contribution.

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

Successfully merging this pull request may close these issues.

Set minimal scoped permissions to github workflow
2 participants