You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the auto-merge functionality of GH needs branch protection active. This is useful by other means as well.
The drawback is that the deploy script is no longer allowed to push to master and stable branches here.
The result is (here an example)
Run ./.github/actions/deploy/create-version.sh
Creating patch version
Updating bumped version files
New version is 0.9.4.
Updating info.xml
Updating package.json
Updating version in main controller
[stable 4b090c2] Bump to version 0.9.4
3 files changed, 3 insertions(+), 3 deletions(-)
Switched to a new branch 'master'
Branch 'master' set up to track remote branch 'master' from 'origin'.
Merge made by the 'recursive' strategy.
.github/actions/deploy/patch | 2 +-
CHANGELOG.md | 5 ++++-
lib/Controller/MainController.php | 2 +-
package.json | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
remote: error: GH006: Protected branch update failed for refs/heads/stable.
remote: error: 4 of 4 required status checks are expected.
To https://github.com./nextcloud/cookbook
! [remote rejected] stable -> stable (protected branch hook declined)
error: failed to push some refs to 'https://github.com./nextcloud/cookbook'
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: 5 of 5 required status checks are expected.
To https://github.com./nextcloud/cookbook
! [remote rejected] master -> master (protected branch hook declined)
error: failed to push some refs to 'https://github.com./nextcloud/cookbook'
To https://github.com./nextcloud/cookbook
* [new tag] v0.9.4 -> v0.9.4
The solution would be to
Create a bot user in GH and add it as admin to the repo
Create a personal access token (PAT) for the user and add it as a secret
Replacing the GITHUB_TOKEN with the secret PAT
Updating the deploy script to not run when pushing from the bot user (checking github.actor from the context), otherwise a infinite recursion will be the result
The text was updated successfully, but these errors were encountered:
Currently, the auto-merge functionality of GH needs branch protection active. This is useful by other means as well.
The drawback is that the deploy script is no longer allowed to push to
master
andstable
branches here.The result is (here an example)
The solution would be to
github.actor
from the context), otherwise a infinite recursion will be the resultThe text was updated successfully, but these errors were encountered: