-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to upload workflow asset with default name when run in matrix #467
Comments
I also have a potentially similar problem on a private repo:
|
Since v0.16 the action is making use of
It shows a warning that it doesn't recognize that attribute, according to the documentation you probably want |
@tlbraams Thanks for that information - I now beleive the issue I'm seeing is different enough, so I'll open another issues for it. |
There is a known and I think correct change in behavior that previous releases would silently overwrite workflow assets with the same name. So, for example, if you run within a matrix job and you'd just randomly get one of the artifacts: whichever finished last. This was never the intended behavior, just an oversight. Looking at the repo, it looks like you do indeed have a matrix job. The SBOM artifact name, at least for now, needs to be unique for each run, in other words make it based on the matrix somehow. I had to update the tests for this, see: here. That said, I'm not sure if it's possible offhand, but we might be able to detect when run as part of a matrix build and include some uniqueness as part of the naming so you won't have to do this in the future. |
Awesome, using the matrix strategy resolved this. Thanks for the investigation and guidance. |
Looks like this is covered off by the linked docs update. So I'm gonna close this now. 👍 |
When running this action in a matrix build (and possibly other contexts) without specifying an
artifact-name
, this action will fail due to an attempt to upload identically named artifacts, which is no longer allowed with the new artifact APIs.A workaround is to use some element of the matrix as part of the artifact name as can be seen in the tests here.
It would be ideal to somehow detect when being run in a matrix and use the current values as further discriminator of the automatic artifact and asset names. However it's unclear if this information is available. In fact, it seems the job name doesn't even show this information. A sample run with the context debug output only seems to include:
Note the job name of
test-on-fixture-dirs
, which shows in the UI astest-on-fixture-dirs (ubuntu-latest)
, but there does not appear to be the matrixos
value ofubuntu-latest
anywhere in the payload. More investigation is needed to determine if this can be obtained via API call or some other environment source. We should also explore other options such as using the dependency submission API as a location to store this information.When downloading logs, there may be a line similar to this from an earlier step:
-------- Original report:
My flow has started to fail with no changes from me. It is complaining about a duplicate name (I build 2 container images from 2 branches)
I have attempted to add an
id: ${{ env.BRANCH_NAME }}
to make unique names but the above still occurs.https://github.com/PipeItToDevNull/nginx-certbot/actions
The text was updated successfully, but these errors were encountered: