@@ -83,27 +83,11 @@ jobs:
8383 # just pulled in in that case.
8484 git pull -s recursive -X ours --autostash --rebase
8585 - name : Add data to repo
86- id : commit
8786 uses : EndBug/add-and-commit@cc9c08ba6c8df3b93a8f2db63e89b98368ae2ae8 # v11.1.1
8887 with :
8988 add : results
90- push : false
91- - name : Push results with retry
92- if : ${{ steps.commit.outputs.committed == 'true' }}
93- shell : powershell
94- run : |
95- $branch = $env:GITHUB_REF_NAME
96- for ($attempt = 1; $attempt -le 5; $attempt++) {
97- Write-Host "Push attempt $attempt to origin/$branch"
98- git pull --rebase origin $branch
99- if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
100- git push origin "HEAD:$branch"
101- if ($LASTEXITCODE -eq 0) { exit 0 }
102- if ($attempt -lt 5) {
103- Start-Sleep -Seconds (Get-Random -Minimum 10 -Maximum 40)
104- }
105- }
106- throw "Push failed after 5 attempts"
89+ pull : --rebase --autostash origin "${{ github.ref_name }}"
90+ push_attempts : 5
10791 - name : Upload artifacts
10892 uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.0
10993 with :
@@ -141,30 +125,12 @@ jobs:
141125 # just pulled in in that case.
142126 git pull -s recursive -X ours --autostash --rebase
143127 - name : Adding data to repo
144- id : commit
145128 if : ${{ !inputs.perf }}
146129 uses : EndBug/add-and-commit@cc9c08ba6c8df3b93a8f2db63e89b98368ae2ae8 # v11.1.1
147130 with :
148131 add : results
149- push : false
150- - &push-results-unix
151- name : Push results with retry
152- if : ${{ steps.commit.outputs.committed == 'true' }}
153- shell : bash
154- run : |
155- branch="$GITHUB_REF_NAME"
156- for attempt in 1 2 3 4 5; do
157- echo "Push attempt $attempt to origin/$branch"
158- git pull --rebase origin "$branch"
159- if git push origin "HEAD:$branch"; then
160- exit 0
161- fi
162- if [ "$attempt" -lt 5 ]; then
163- sleep $(( RANDOM % 30 + 10 ))
164- fi
165- done
166- echo "Push failed after 5 attempts" >&2
167- exit 1
132+ pull : --rebase --autostash origin "${{ github.ref_name }}"
133+ push_attempts : 5
168134 - name : Upload benchmark artifacts
169135 if : ${{ !inputs.perf }}
170136 uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.0
@@ -202,12 +168,11 @@ jobs:
202168 # just pulled in in that case.
203169 git pull -s recursive -X ours --autostash --rebase
204170 - name : Add data to repo
205- id : commit
206171 uses : EndBug/add-and-commit@cc9c08ba6c8df3b93a8f2db63e89b98368ae2ae8 # v11.1.1
207172 with :
208173 add : results
209- push : false
210- - *push-results-unix
174+ pull : --rebase --autostash origin "${{ github.ref_name }}"
175+ push_attempts : 5
211176 - name : Upload artifacts
212177 uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.0
213178 with :
0 commit comments