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
Misleading information about protected branches setup #311
Comments
@alekseik1 have you experimented with the Admin scope settings for your PAT, and which scope it is that needs to be enabled? Looks like the We should probably document that scope as well… |
Following up on my comment above, here’s what seems to work:
|
@jenstroeger nope, I did not try any of PATs. Thanks for investigating it, never thought a PAT token would do the trick. |
I assumed by “token” you meant a personal access token (PAT) with admin permissions? Did I misunderstand something?
The PAT I created I also added to the |
Hi!
I recently tried to set up automated releases on GitHub Actions as prescribed in official manual. My
master
branch is protected: it is required that a commit passes CI checks before it can be merged into master.My CI pipelines has been constantly failing for all times with error
'remote: error: GH006: Protected branch update failed for refs/heads/master
. I created a personal access token with admin rights (it was actually my account PAT), saved to repo's secrets and passed it to GH action:but it did not work. Also, I found another issue here #274 addressing almost the same problem but proposed solution did not work out as well.
After some experiments I found out that an admin token should be also passed to
actions/checkout@v2
for it to have push access (action homepage). So my final pipeline looks as follows:This version works as expected: creates version commit with changelog if necessary, then pushes it to github, creates release on both GitHub and PyPi (the latter can be disabled in settings though).
I think it should be mentioned in docs that a personal access token should be passed to
checkout
action as well.Thanks in advance.
The text was updated successfully, but these errors were encountered: