55 MAINTAINERS : |
66 # GitHub user names to request reviews from in cases where PRs can't be managed automatically.
77 - per1234
8- CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT : check-submissions-failed
8+ CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PREFIX : check-submissions-failed-
99 ERROR_MESSAGE_PREFIX : " :x: **ERROR:** "
1010
1111on :
@@ -114,7 +114,7 @@ jobs:
114114 run : echo "::set-output name=head::$(jq -c .head.sha "${{ steps.configuration.outputs.path }}/${{ env.JSON_IDENTIFIER }}")"
115115
116116 - name : Upload diff file to workflow artifact
117- uses : actions/upload-artifact@v3
117+ uses : actions/upload-artifact@v4
118118 with :
119119 path : ${{ steps.configuration.outputs.path }}/${{ steps.configuration.outputs.filename }}
120120 name : ${{ steps.configuration.outputs.artifact }}
@@ -144,13 +144,13 @@ jobs:
144144 location : ${{ runner.temp }}
145145
146146 - name : Download diff
147- uses : actions/download-artifact@v3
147+ uses : actions/download-artifact@v4
148148 with :
149149 path : ${{ needs.diff.outputs.path }}
150150 name : ${{ needs.diff.outputs.artifact }}
151151
152152 - name : Remove no longer needed artifact
153- uses : geekyeggo/delete-artifact@v2
153+ uses : geekyeggo/delete-artifact@v5
154154 with :
155155 name : ${{ needs.diff.outputs.artifact }}
156156
@@ -376,16 +376,23 @@ jobs:
376376 if : env.PASS == 'false'
377377 run : touch ${{ env.FAIL_FLAG_PATH }} # Arbitrary file to provide content for the flag artifact
378378
379+ # Each workflow artifact must have a unique name. The job matrix doesn't provide a guaranteed unique string to use
380+ # for a name so it is necessary to generate one.
381+ - name : Generate unique artifact suffix
382+ if : env.PASS == 'false'
383+ run : |
384+ echo "CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_SUFFIX=$(cat /proc/sys/kernel/random/uuid)" >> "$GITHUB_ENV"
385+
379386 # The value of a job matrix output is set by whichever job happened to run last, not of use for this application.
380387 # So it's necessary to use an alternative means of indicating that at least one submission failed the checks.
381388 - name : Upload failure flag artifact
382389 if : env.PASS == 'false'
383- uses : actions/upload-artifact@v3
390+ uses : actions/upload-artifact@v4
384391 with :
385392 if-no-files-found : error
386393 include-hidden-files : true
387394 path : ${{ env.FAIL_FLAG_PATH }}
388- name : ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT }}
395+ name : ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PREFIX }}${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_SUFFIX }}
389396
390397 check-submissions-result :
391398 needs : check-submissions
@@ -394,13 +401,22 @@ jobs:
394401 outputs :
395402 pass : ${{ steps.failure-flag-exists.outcome == 'failure' }}
396403
404+ env :
405+ CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PATH : ${{ github.workspace }}/artifacts
406+
397407 steps :
408+ - name : Download submission check failure flag artifacts
409+ uses : actions/download-artifact@v4
410+ with :
411+ path : ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PATH }}
412+ pattern : ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PREFIX }}*
413+
398414 - name : Check for existence of submission check failure flag artifact
399415 id : failure-flag-exists
400- uses : actions/download-artifact@v3
401416 continue-on-error : true
402- with :
403- name : ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT }}
417+ # actions/download-artifact does not create a folder per its `path` input if no artifacts match `pattern`.
418+ run : |
419+ test -d "${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PATH }}"
404420
405421 check-submissions-fail :
406422 needs :
0 commit comments