Skip to content

Commit

Permalink
Upgrade actions/upload-artifact@v4, actions/download-artifact@v4 and …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
cmaglie committed Jul 31, 2024
1 parent 3b79267 commit 0240e3b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions workflow-templates/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ jobs:
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}

- name: Pass configuration files to next job via workflow artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: |
*.yaml
*.yml
if-no-files-found: error
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-${{ matrix.filename }}

sync:
needs: download
Expand Down Expand Up @@ -114,15 +114,16 @@ jobs:
uses: actions/checkout@v4

- name: Download configuration files artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
pattern: ${{ env.CONFIGURATIONS_ARTIFACT }}-*
merge-multiple: true
path: ${{ env.CONFIGURATIONS_FOLDER }}

- name: Remove unneeded artifact
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v5
with:
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-*

- name: Merge label configuration files
run: |
Expand Down

0 comments on commit 0240e3b

Please sign in to comment.