mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-10-20 18:56:24 +00:00
ci: let the master-to-main merge wait for every required check
The auto-merge job fires when CI finishes, but Code Quality, Security and CodeQL can still be running then. Once main requires those checks, a direct merge at that moment is refused and nothing would retry it. Try the merge, and if the branch rules do not allow it yet, hand it to GitHub auto-merge.
This commit is contained in:
1 parent
bfb2b74aed
commit
b44b84f0a3
1 file changed
+8
-1
@@ -40,8 +40,15 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# CI finishing does not mean every required check has: Code Quality,
|
||||
# Security and CodeQL may still be running. Merge now if the branch
|
||||
# rules allow it, otherwise let GitHub merge once they pass.
|
||||
echo "Merging PR #$PR_NUMBER"
|
||||
gh pr merge "$PR_NUMBER" \
|
||||
--repo "$GITHUB_REPOSITORY" \
|
||||
--merge \
|
||||
--delete-branch=false
|
||||
--delete-branch=false \
|
||||
|| gh pr merge "$PR_NUMBER" \
|
||||
--repo "$GITHUB_REPOSITORY" \
|
||||
--merge \
|
||||
--auto
|
||||
Reference in new issue
Block a user