Bump upload-artifact and actions/download-artifact from 3 to 4#104
Bump upload-artifact and actions/download-artifact from 3 to 4#104viktorkholod wants to merge 1 commit into
Conversation
|
|
per1234
left a comment
There was a problem hiding this comment.
The "Sync Labels" GitHub Actions workflow is configured to allow the use of multiple shared label configuration files. This is done by using a job matrix in the GitHub Actions workflow to download each of the files from the source repository in a parallel GitHub Actions workflow job. A GitHub Actions workflow artifact was used to transfer the generated files between sequential jobs in the workflow. The "actions/upload-artifact" and "actions/download-artifact" actions are used for this purpose.
Currently, a single artifact was used for the transfer of all the shared label configuration files, with each of the parallel jobs uploading its own generated files to that artifact. However, support for uploading multiple times to a single artifact was dropped in version 4.0.0 of the "actions/upload-artifact" action. So your current proposal of simply bumping the action versions in the workflow are not sufficient, as we can see from the failure of the workflow run triggered by the PR:
https://github.com/arduino/setup-protoc/actions/runs/11723327027/job/32654772546?pr=104#step:3:19
Run actions/upload-artifact@v4
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
It is now necessary to use a dedicated artifact for each of the builds. These can be downloaded in aggregate by using the artifact name globbing and merging features which were introduced in version 4.1.0 of the "actions/download-artifact" action. You can see how that is done here in the upstream copy of the workflow:
arduino/tooling-project-assets@a4efefd
You must also bump the geekyeggo/delete-artifact action dependency of the "Sync Labels" GitHub Actions workflow because the current version v1 is incompatible with the artifacts produced by actions/upload-artifact@v4:
https://github.com/GeekyEggo/delete-artifact#-compatibility
✅ Compatibility
actions/upload-artifactgeekyeggo/delete-artifact@v1,@v2,@v3@v1,@v2@v4@v4,@v5
|
Opened a new PR with the suggestions above |
Artifact actions v3 is set to be deprecated by December 5, 2024 (https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/). I am updating actions/upload-artifact and actions/download-artifact to version 3.