mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-27 01:58:09 -07:00
Fix release script merge delay
This commit is contained in:
@@ -74,11 +74,44 @@ jobs:
|
||||
|
||||
- name: "Commit new version number"
|
||||
uses: EndBug/add-and-commit@v9
|
||||
id: commit
|
||||
with:
|
||||
default_author: github_actions
|
||||
message: Update version number
|
||||
add: 'fbt_options.py scripts/version.py'
|
||||
|
||||
- name: "Wait for checks to pass"
|
||||
run: |
|
||||
${{ steps.commit.outputs.pushed }}
|
||||
sha="${{ steps.commit.outputs.commit_long_sha }}"
|
||||
|
||||
while [ "$new" != "$sha" ]; do
|
||||
sleep 1
|
||||
new="$(curl -s https://api.github.com/repos/${{ github.event.pull_request.base.repo.full_name }}/pulls/${{ github.event.pull_request.number }} | jq -r ".head.sha")"
|
||||
done
|
||||
|
||||
checks="$(curl -s https://api.github.com/repos/${{ github.event.pull_request.base.repo.full_name }}/branches/main | jq -r ".protection.required_status_checks.contexts[]")"
|
||||
for check in $checks; do
|
||||
found=false
|
||||
while ! $found; do
|
||||
sleep 1
|
||||
suites="$(curl -s https://api.github.com/repos/${{ github.event.pull_request.head.repo.full_name }}/commits/$sha/check-suites | jq -r ".check_suites[].check_runs_url")"
|
||||
for suite in $suites; do
|
||||
completed=false
|
||||
while ! $completed; do
|
||||
sleep 1
|
||||
run="$(curl -s $suite | jq -r '.check_runs[] | select(.name == "$check")')"
|
||||
[ "$run" != "" ] || continue 2
|
||||
found=true
|
||||
[ "$(echo "$run" | jq -r ".status")" = "completed" ] || continue
|
||||
completed=true
|
||||
[ "$(echo "$run" | jq -r ".conclusion")" = "success" ]
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
- name: "Merge pull request"
|
||||
uses: "pascalgn/automerge-action@v0.15.6"
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user