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-token clarification… #109

Closed
ghost opened this issue Apr 26, 2021 · 6 comments
Closed

github-token clarification… #109

ghost opened this issue Apr 26, 2021 · 6 comments
Labels
help wanted Extra attention is needed question Further information is requested wontfix This will not be worked on

Comments

@ghost
Copy link

ghost commented Apr 26, 2021

I have a protected main branch with admins allowed to push and a private token from an admin account set as github-token: ${{ secrets.ADMIN_RELEASE_TOKEN }}. However, when running the action, I get:

remote: error: GH006: Protected branch update failed for refs/heads/main.       
remote: error: At least 1 approving review is required by reviewers with write access.

The token I use has delete:packages, repo, write:packages permissions. Should it have more or did I find a bug?

@TriPSs
Copy link
Owner

TriPSs commented Apr 26, 2021

Hi @ygworldr, sadly I'm not quite sure yet on how to fix this. There is this medium article that describes it on how to achieve this.

@TriPSs TriPSs added help wanted Extra attention is needed question Further information is requested labels Apr 26, 2021
@ghost
Copy link
Author

ghost commented Apr 26, 2021

I do not use an automatic build on commit to main, instead, I use the manual way to kick an action. This means I can remove protection, launch the action, and re-create protection as soon as the release is done. A little clunky but not too bad.

@xsc27
Copy link
Contributor

xsc27 commented Jun 12, 2021

Would deploy keys, issue #115, resolve this? I think it could be a cleaner workaround.

@stale
Copy link

stale bot commented Aug 11, 2021

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.

@stale stale bot added the wontfix This will not be worked on label Aug 11, 2021
@stale stale bot closed this as completed Aug 18, 2021
@xsc27
Copy link
Contributor

xsc27 commented Sep 28, 2021

TIL: Deploy keys and GitHub Apps will not get around protected branches that require a pull request, i.e.:
image

@vtertre
Copy link

vtertre commented Mar 27, 2023

Hi @ygworldr, sadly I'm not quite sure yet on how to fix this. There is this medium article that describes it on how to achieve this.

If it can save anyone some time, at this date you still have to use your PAT on the checkout step also, and not only on the TriPSs/conventional-changelog-action to push to protected branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants