GeekyEggo / delete-artifact

A GitHub Action to deletes artifacts within the workflow run.
MIT License
192 stars 51 forks source link

Tip: `@actions/artifact` added methods to delete artifacts #19

Closed muzimuzhi closed 7 months ago

muzimuzhi commented 9 months ago

See

It seems to me then implementation in current repo could be simplified, once @actions/artifact ships a new release.

GeekyEggo commented 9 months ago

This is really helpful, and may remove the need for the new token parameter. Thank you for bringing this to my attention!

muzimuzhi commented 8 months ago

actions/artifact has just released v2.1.1 which ships with the new method artifact.deleteArtifact(), see https://www.npmjs.com/package/@actions/artifact/v/2.1.1 and the doc for new method.

Note that as I'm writing this there's no tag @actions/artifact@2.1.1 in repo https://github.com/actions/toolkit yet, but the new version is indeed uploaded to npm hence useable to downstream actions, e.g., https://github.com/actions/download-artifact/commit/9ac5cad9e2799348da3b2da75c8fbfa73ab3011c.

Update: I reported https://github.com/actions/toolkit/issues/1658.

GeekyEggo commented 7 months ago

This is now resolved with geekyeggo/delete-artifact@v5 🚀