Skip to content

Commit 928db18

Browse files
committed
fix(autoupdate): robust wait-for-checks logic before merge
1 parent fe928e3 commit 928db18

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/autoupdate.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,13 @@ jobs:
172172
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173173
PR_URL: ${{ steps.pr_success.outputs.pr_url }}
174174
run: |
175-
for i in $(seq 1 10); do
176-
COUNT=$(gh pr checks "$PR_URL" 2>/dev/null | grep -c '\S' || true)
175+
for i in $(seq 1 20); do
176+
COUNT=$(gh pr checks "$PR_URL" 2>/dev/null | grep -cE 'https?://' || true)
177177
[ "$COUNT" -gt 0 ] && break
178178
sleep 30
179179
done
180-
gh pr checks "$PR_URL" --watch
180+
gh pr checks "$PR_URL" --watch || true
181+
gh pr checks "$PR_URL" 2>/dev/null | grep -qE '\s+fail\b' && { echo "checks failed"; exit 1; }
181182
gh pr merge "$PR_URL" --squash --delete-branch
182183
- name: Tag release commit and dispatch deploy
183184
if: steps.merge_pr.outcome == 'success' && steps.pkg.outputs.version != ''

0 commit comments

Comments
 (0)