Skip to content

Commit 756b6bc

Browse files
committed
Integrate retry for upload artifact
1 parent 4e9969e commit 756b6bc

1 file changed

Lines changed: 124 additions & 5 deletions

File tree

.github/workflows/zzz-reuse-build.yml

Lines changed: 124 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
181181
182182
# ------------------------------------------------------------
183-
# Artifact Expot
183+
# Artifact Expot (base)
184184
# ------------------------------------------------------------
185185

186186
###
@@ -193,17 +193,48 @@ jobs:
193193
make save VERSION=${{ matrix.version }} FLAVOUR=base ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.base }}
194194
if: ${{ inputs.flavour == 'base' }}
195195

196+
###
197+
### Try 1
198+
###
196199
- name: "[Artifact Save] Upload base"
197200
uses: Wandalen/[email protected]
198201
with:
199-
action: cytopia/upload-artifact[email protected]
202+
action: actions/upload-artifact@v3
200203
with: |
201204
name: ${{ steps.set-artifact-name.outputs.base }}
202205
path: ${{ steps.set-artifact-name.outputs.base }}
203206
attempt_limit: 20
204207
attempt_delay: 10000
205208
if: ${{ inputs.flavour == 'base' }}
206209

210+
- name: "[Artifact Save] Upload base (verify)"
211+
continue-on-error: true
212+
id: download-base-1
213+
uses: actions/download-artifact@v3
214+
with:
215+
name: ${{ steps.set-artifact-name.outputs.base }}
216+
path: ${{ steps.set-artifact-name.outputs.base }}
217+
if: ${{ inputs.flavour == 'base' }}
218+
219+
###
220+
### Try 2
221+
###
222+
- name: "[Artifact Save] Upload base (retry)"
223+
uses: Wandalen/[email protected]
224+
with:
225+
action: actions/upload-artifact@v3
226+
with: |
227+
name: ${{ steps.set-artifact-name.outputs.base }}
228+
path: ${{ steps.set-artifact-name.outputs.base }}
229+
attempt_limit: 20
230+
attempt_delay: 10000
231+
if: ${{ inputs.flavour == 'base' && steps.download-base-1.outcome == 'failure'}}
232+
233+
234+
# ------------------------------------------------------------
235+
# Artifact Expot (mods)
236+
# ------------------------------------------------------------
237+
207238
###
208239
### Export and Upload mods
209240
###
@@ -214,17 +245,48 @@ jobs:
214245
make save VERSION=${{ matrix.version }} FLAVOUR=mods ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.mods }}
215246
if: ${{ inputs.flavour == 'mods' }}
216247

248+
###
249+
### Try 1
250+
###
217251
- name: "[Artifact Save] Upload mods"
218252
uses: Wandalen/[email protected]
219253
with:
220-
action: cytopia/upload-artifact[email protected]
254+
action: actions/upload-artifact@v3
221255
with: |
222256
name: ${{ steps.set-artifact-name.outputs.mods }}
223257
path: ${{ steps.set-artifact-name.outputs.mods }}
224258
attempt_limit: 20
225259
attempt_delay: 10000
226260
if: ${{ inputs.flavour == 'mods' }}
227261

262+
- name: "[Artifact Save] Upload mods (verify)"
263+
continue-on-error: true
264+
id: download-mods-1
265+
uses: actions/download-artifact@v3
266+
with:
267+
name: ${{ steps.set-artifact-name.outputs.mods }}
268+
path: ${{ steps.set-artifact-name.outputs.mods }}
269+
if: ${{ inputs.flavour == 'mods' }}
270+
271+
###
272+
### Try 2
273+
###
274+
- name: "[Artifact Save] Upload mods (retry)"
275+
uses: Wandalen/[email protected]
276+
with:
277+
action: actions/upload-artifact@v3
278+
with: |
279+
name: ${{ steps.set-artifact-name.outputs.mods }}
280+
path: ${{ steps.set-artifact-name.outputs.mods }}
281+
attempt_limit: 20
282+
attempt_delay: 10000
283+
if: ${{ inputs.flavour == 'mods' && steps.download-mods-1.outcome == 'failure'}}
284+
285+
286+
# ------------------------------------------------------------
287+
# Artifact Expot (prod)
288+
# ------------------------------------------------------------
289+
228290
###
229291
### Export and Upload prod
230292
###
@@ -235,17 +297,48 @@ jobs:
235297
make save VERSION=${{ matrix.version }} FLAVOUR=prod ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.prod }}
236298
if: ${{ inputs.flavour == 'prod' }}
237299

300+
###
301+
### Try 1
302+
###
238303
- name: "[Artifact Save] Upload prod"
239304
uses: Wandalen/[email protected]
240305
with:
241-
action: cytopia/upload-artifact[email protected]
306+
action: actions/upload-artifact@v3
242307
with: |
243308
name: ${{ steps.set-artifact-name.outputs.prod }}
244309
path: ${{ steps.set-artifact-name.outputs.prod }}
245310
attempt_limit: 20
246311
attempt_delay: 10000
247312
if: ${{ inputs.flavour == 'prod' }}
248313

314+
- name: "[Artifact Save] Upload prod (verify)"
315+
continue-on-error: true
316+
id: download-prod-1
317+
uses: actions/download-artifact@v3
318+
with:
319+
name: ${{ steps.set-artifact-name.outputs.prod }}
320+
path: ${{ steps.set-artifact-name.outputs.prod }}
321+
if: ${{ inputs.flavour == 'prod' }}
322+
323+
###
324+
### Try 2
325+
###
326+
- name: "[Artifact Save] Upload prod (retry)"
327+
uses: Wandalen/[email protected]
328+
with:
329+
action: actions/upload-artifact@v3
330+
with: |
331+
name: ${{ steps.set-artifact-name.outputs.prod }}
332+
path: ${{ steps.set-artifact-name.outputs.prod }}
333+
attempt_limit: 20
334+
attempt_delay: 10000
335+
if: ${{ inputs.flavour == 'prod' && steps.download-prod-1.outcome == 'failure'}}
336+
337+
338+
# ------------------------------------------------------------
339+
# Artifact Expot (work)
340+
# ------------------------------------------------------------
341+
249342
###
250343
### Export and Upload work
251344
###
@@ -256,13 +349,39 @@ jobs:
256349
make save VERSION=${{ matrix.version }} FLAVOUR=work ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.work }}
257350
if: ${{ inputs.flavour == 'work' }}
258351

352+
###
353+
### Try 1
354+
###
259355
- name: "[Artifact Save] Upload work"
260356
uses: Wandalen/[email protected]
261357
with:
262-
action: cytopia/upload-artifact[email protected]
358+
action: actions/upload-artifact@v3
263359
with: |
264360
name: ${{ steps.set-artifact-name.outputs.work }}
265361
path: ${{ steps.set-artifact-name.outputs.work }}
266362
attempt_limit: 20
267363
attempt_delay: 10000
268364
if: ${{ inputs.flavour == 'work' }}
365+
366+
- name: "[Artifact Save] Upload work (verify)"
367+
continue-on-error: true
368+
id: download-work-1
369+
uses: actions/download-artifact@v3
370+
with:
371+
name: ${{ steps.set-artifact-name.outputs.work }}
372+
path: ${{ steps.set-artifact-name.outputs.work }}
373+
if: ${{ inputs.flavour == 'work' }}
374+
375+
###
376+
### Try 2
377+
###
378+
- name: "[Artifact Save] Upload work (retry)"
379+
uses: Wandalen/[email protected]
380+
with:
381+
action: actions/upload-artifact@v3
382+
with: |
383+
name: ${{ steps.set-artifact-name.outputs.work }}
384+
path: ${{ steps.set-artifact-name.outputs.work }}
385+
attempt_limit: 20
386+
attempt_delay: 10000
387+
if: ${{ inputs.flavour == 'work' && steps.download-work-1.outcome == 'failure'}}

0 commit comments

Comments
 (0)