rundel/Clear Artifacts
Delete workflow artifacts in a repository, optionally scoped by branch, name, or age.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| token | GitHub token used to authenticate API requests. Needs the `actions: write` permission to delete artifacts. | no | ${{ github.token }} |
| repository | Repository to clear artifacts from, in `owner/repo` format. | no | ${{ github.repository }} |
| branch | Branch scope. Empty (or `all`) deletes artifacts from every branch. `current` deletes artifacts for the branch that triggered this run. Any other value is matched against each artifact's `workflow_run.head_branch`. | no | "" |
| name | Glob pattern for artifact names to delete (e.g. `hw1-*`). Empty deletes all names. | no | "" |
| older-than | Only delete artifacts created more than this many days ago. Empty or 0 disables the age filter. | no | "" |
| dry-run | When `true`, log what would be deleted without deleting anything. | no | false |
Outputs
| name | description |
|---|---|
| deleted-count | Number of artifacts deleted (or that would be deleted in a dry run). |
| deleted-names | JSON array of the artifact names that were deleted. |