Skip to content

Commit 0240e3b

Browse files
committed
Upgrade actions/upload-artifact@v4, actions/download-artifact@v4 and geekyeggo/delete-artifact@v5
The workflow previously uploaded multiple artifacts under the same 'name'. This is no more allowed on v4, so we have to upload each artifact under a unique name. When downloading we can merge multiple artifacts using the 'pattern' matching and the `merge-multiple: true` option. The geekyeggo/delete-artifact instead can use the pattern matching directly in the `name` field.
1 parent 3b79267 commit 0240e3b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

workflow-templates/sync-labels.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ jobs:
7373
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
7474

7575
- name: Pass configuration files to next job via workflow artifact
76-
uses: actions/upload-artifact@v3
76+
uses: actions/upload-artifact@v4
7777
with:
7878
path: |
7979
*.yaml
8080
*.yml
8181
if-no-files-found: error
82-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
82+
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-${{ matrix.filename }}
8383

8484
sync:
8585
needs: download
@@ -114,15 +114,16 @@ jobs:
114114
uses: actions/checkout@v4
115115

116116
- name: Download configuration files artifact
117-
uses: actions/download-artifact@v3
117+
uses: actions/download-artifact@v4
118118
with:
119-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
119+
pattern: ${{ env.CONFIGURATIONS_ARTIFACT }}-*
120+
merge-multiple: true
120121
path: ${{ env.CONFIGURATIONS_FOLDER }}
121122

122123
- name: Remove unneeded artifact
123-
uses: geekyeggo/delete-artifact@v2
124+
uses: geekyeggo/delete-artifact@v5
124125
with:
125-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
126+
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-*
126127

127128
- name: Merge label configuration files
128129
run: |

0 commit comments

Comments
 (0)