Skip to content

Commit ae5709d

Browse files
authored
Update sync-main.yml
1 parent 41406d1 commit ae5709d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/sync-main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@ jobs:
4848
- name: Push sync branch
4949
run: |
5050
git push origin sync-main-pr --force
51+
# Ensure branch is visible to GitHub
52+
gh api repos/:owner/:repo/branches/sync-main-pr || {
53+
echo "Branch not yet visible to GitHub — waiting a bit more"
54+
sleep 10
55+
}
5156
- name: Create or update PR
5257
run: |
58+
gh api repos/:owner/:repo/branches/sync-main-pr
5359
PR_URL=$(gh pr list --head sync-main-pr --json url --jq '.[0].url')
5460
if [ -z "$PR_URL" ]; then
5561
gh pr create \
@@ -60,6 +66,7 @@ jobs:
6066
else
6167
echo "PR already exists: $PR_URL"
6268
fi
69+
exit 0
6370
env:
6471
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
6572
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

0 commit comments

Comments
 (0)