Skip to content

Conversation

@robherley
Copy link
Contributor

@robherley robherley commented Jan 17, 2024

Having official client methods to delete artifacts will make some use cases much simpler.
For instance, this could allow the ability to overwrite an artifact eventually in actions/upload-artifact.

e.g.

- uses: actions/upload-artifact@v4
  with:
    name: my-artifact
    path: path/to/artifact/
    overwrite: true # something like this

Where overwrite would delete an artifact first, allowing for the upload of another.

I'll update the documentation in a separate PR.

Closes: #380
Partially supports: actions/upload-artifact#471

@robherley robherley marked this pull request as ready for review January 17, 2024 23:32
@robherley robherley requested review from a team as code owners January 17, 2024 23:32
@robherley robherley merged commit daf23ba into main Jan 18, 2024

return deleteArtifactInternal(artifactName)
} catch (error) {
warning(
Copy link
Contributor

Choose a reason for hiding this comment

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

Since there is no await for deleteArtifactPublic / deleteArtifactInternal is this warning actually printed when something goes wrong asynchronously? To me it looks this only catches errors which are thrown synchronously.

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.

Delete Artifacts using @actions/artifact

5 participants