github-action-matrix-outputs-write icon indicating copy to clipboard operation
github-action-matrix-outputs-write copied to clipboard

Allow user to specify artifact name

Open TheBatman09 opened this issue 1 year ago • 5 comments

Use Case

Hello guys, I've started using this action and I came across the following issue: I have some dynamically retrieved data that I write with a step name and a matrix name. Then I retrieve some data again and try to write it with a different step name but same matrix name. And here when the data is the same for first and second time I get an error saying the artifact already exists. By looking at the code it looks like that's because the artifact name used is a hash of the content and in my case the content is the same in both cases.

Expected Behavior

I expect to be able to write the same data twice with a different step name.

Describe Ideal Solution

I think the ideal solution would be to add a parameter to the action to allow the user to chose the key used to store the artifact and/or also include the step name in the hash to allow storing twice the same data if it has a different step name.

Bonus

It seems like a fairly easy fix, i'd be happy to contribute if needed

TheBatman09 avatar Mar 07 '24 08:03 TheBatman09

Hey @goruha If you'd like I could propose a pull request for this 😉

TheBatman09 avatar Mar 20 '24 08:03 TheBatman09

@TheBatman09, thanks for the feature request. Your PR is more than welcome.

goruha avatar Mar 20 '24 09:03 goruha

Voila !

TheBatman09 avatar Mar 20 '24 18:03 TheBatman09