Skip to content

Commit 1647b05

Browse files
Fix update workflow push PR (#30)
* Fix update workflow push PR * Apply suggestion from @Metadorius --------- Co-authored-by: Kerbiter <[email protected]>
1 parent 9de1ea3 commit 1647b05

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/upd-xna-client.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,21 @@ jobs:
175175
# Push changes
176176
git push --force origin ${{ env.UPDATE_BRANCH_NAME }}-${{ steps.download.outputs.tag_name }}
177177
178-
# This timeout is for the remote server to index received content
179-
timeout /t 10 > nul
180-
181178
# Open a PR
182-
gh pr create -B main -H ${{ env.UPDATE_BRANCH_NAME }}-${{ steps.download.outputs.tag_name }} --title '${{ env.PR_TITLE }} ${{ steps.download.outputs.tag_name }}' --body '${{ env.PR_BODY }}'
179+
foreach ($timemout_attempt in 1..10)
180+
{
181+
# This timeout is for the remote server to index received content
182+
timeout /t 10 > nul
183+
184+
try
185+
{
186+
gh pr create -B main -H ${{ env.UPDATE_BRANCH_NAME }}-${{ steps.download.outputs.tag_name }} --title '${{ env.PR_TITLE }} ${{ steps.download.outputs.tag_name }}' --body '${{ env.PR_BODY }}'
187+
break
188+
}
189+
catch
190+
{
191+
echo "Server haven't indexed the content yet. Attempting to create a PR again..."
192+
}
193+
}
183194
}
184195
}

0 commit comments

Comments
 (0)