File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments