GeekyEggo / delete-artifact

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

fix: mark the action as failed on uncaught errors #18

Closed TheMrMilchmann closed 9 months ago

TheMrMilchmann commented 9 months ago

Currently, the action only logs errors during the configuration phase and for internal bugs but does not mark the step as failed. This change fixes this by failing the step if any error is thrown (and not caught elsewhere).

See this workflow run for example without this change and this run with the change.

TheMrMilchmann commented 9 months ago

To add some additional context on why this is important: When Dependabot opens a PR to update this action to v4, the checks might succeed, despite token not being configured. This can trick people into merging the PR and having essentially while this action silently fails.

GeekyEggo commented 9 months ago

Thanks for bringing this to my attention, @TheMrMilchmann. This should now be fixed in v4.1.0. I've also introduced a default value for token. If you experience any problems, please let me know.