Skip to content
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

Add methods to delete artifacts #1626

Merged
merged 6 commits into from
Jan 18, 2024
Merged

Add methods to delete artifacts #1626

merged 6 commits into from
Jan 18, 2024

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
14 checks passed

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
4 participants