-
Notifications
You must be signed in to change notification settings - Fork 123
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
Enable push to a protected branch #29
Comments
Update, also pushing to a separate branch has side-effects
|
I looked into this out of curiosity, and it seems that pushing to protected branches through GitHub Actions is not possible directly. See for example a similar discussion and a comment from GitHub staff. It looks like there is no intention of allowing Actions to bypass the protection (or at least wasn't at the time). One workaround may be to create a PR (either as part of this action or as a separate step) and then merge it. Another alternative involves using a token by an admin user, and excluding admin users from the protection (though that can lead to weird behaviour because it look like the push was made by a real user, which can trigger workflows). |
GitHub now has a setting for this: https://github.blog/changelog/2021-11-19-allow-bypassing-required-pull-requests/ |
I managed to work around this by pushing to a separate branch, then including the full URL to the raw SVG from that branch in my README. GitHub Action:
README link:
And everything should work splendidly! 😊 |
Thanks for this nice action!
When adding it to my GitHub action file it turns out it's unable to push it because the master branch is protected.
I've managed to make it work by pushing to a different branch. However, it would be desirable to have some kind of option to allow pushing also to a protected branch if the committing user is allowed to.
The text was updated successfully, but these errors were encountered: