Skip to content

Conversation

TheBatman09
Copy link

what

An optional input artifact-name is added to allow the user to specify how to name the artifacts stored.
If the input is missing, the hash is used as before.

why

Due to the use of a hash of the content as an artifact name, if different steps (with a different step name) try to use the action to write the same content, the build will fail. The first step will succeed but the second one will fail because an artifact with the same name already exists.

references

Fixes #44


const artifactClient = new DefaultArtifactClient();
const artifactName = hex;
const artifactName = isEmptyInput(artifact_name) ? hex : artifact_name + matrix_key;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hesitated here to rename the artifactName const to something else to differentiate them. However since I noticed inputs are in snake case, I thought maybe that's your convention to differentiate inputs form the rest and that's enough

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.

Allow user to specify artifact name

1 participant