Skip to content

Fix artifact name used if skipArchive is set to false#2448

Open
NotTheEvilOne wants to merge 1 commit into
actions:mainfrom
b1-systems:fix-upload-artifact-archiving-name
Open

Fix artifact name used if skipArchive is set to false#2448
NotTheEvilOne wants to merge 1 commit into
actions:mainfrom
b1-systems:fix-upload-artifact-archiving-name

Conversation

@NotTheEvilOne

@NotTheEvilOne NotTheEvilOne commented Jul 2, 2026

Copy link
Copy Markdown

The relatively newly added support to upload artifacts without archiving to a ZIP file seems to be somewhat flawed as discussed e.g. here [1] and [2].

Instead of using the (already) required name in uploadArtifact() it is blindly overridden by artifactFileName. This breaks various GitHub actions logic e.g. to upload files already packed to a tar.gz (and therefore without any benefit of repacking to a ZIP archive) but expecting to download it under the given name of the uploaded artifact. It seems that in actions/upload-artifact [3] it breaks the overwrite action designed as follows:
If true, an artifact with a matching name will be deleted before a new one is uploaded.

Yes, it is documented downstream (actions/upload-artifact) that basename is used instead if archive is set to false but this behavior seems to be a design flaw as there is no need to enforce different artifact name generation and usage based on if a ZIP archive is uploaded or not. Further restrictions like only supporting single files are logic consequences.

[1] actions/upload-artifact#785
[2] actions/upload-artifact#769
[3] https://github.com/actions/upload-artifact

Fixes: #2441

Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
@NotTheEvilOne NotTheEvilOne force-pushed the fix-upload-artifact-archiving-name branch from 7cbd8d1 to 513a59e Compare July 2, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Name Parameter Change for Single-File Artifact Upload

1 participant