Fix artifact name used if skipArchive is set to false#2448
Open
NotTheEvilOne wants to merge 1 commit into
Open
Fix artifact name used if skipArchive is set to false#2448NotTheEvilOne wants to merge 1 commit into
skipArchive is set to false#2448NotTheEvilOne wants to merge 1 commit into
Conversation
29204c4 to
7cbd8d1
Compare
Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
7cbd8d1 to
513a59e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
nameinuploadArtifact()it is blindly overridden byartifactFileName. This breaks various GitHub actions logic e.g. to upload files already packed to atar.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 inactions/upload-artifact[3] it breaks theoverwriteaction 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 ifarchiveis set tofalsebut 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