amezin/Prune Container Registry
Remove outdated container images from GitHub Container Registry
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| owner | Package owner (user or organization) name | yes | ${{ github.repository_owner }} |
| name | Package name | yes | — |
| tag-patterns | Glob (minimatch) patterns, one per line. Allows applying different storage durations (`matching-tags-retention-duration` and `mismatching-tags-retention-duration`) based on tags. | — | — |
| matching-tags-retention-duration | Storage duration for images with tags matching `tag-patterns`, as ISO 8601 duration. If more than this amount of time elapsed since last update of the image, the image will be deleted. If the same image (version) also has tags not matching `tag-patterns`, maximum of the two durations will be chosen. If not set, images with tags matching `tag-patterns` won't be deleted. | — | — |
| mismatching-tags-retention-duration | Storage duration for images with tags not matching `tag-patterns`, as ISO 8601 duration. If more than this amount of time elapsed since last update of the image, the image will be deleted. If the same image (version) also has tags matching `tag-patterns`, maximum of the two durations will be chosen. If not set, images with tags not matching `tag-patterns` won't be deleted. | — | — |
| untagged-retention-duration | Storage duration for untagged images, as ISO 8601 duration. If more than this amount of time elapsed since last update of the image, the image will be deleted. If not set, untagged images won't be deleted. | — | — |
| reference-time | Current date and time (ISO 8601) used as the reference "now" when computing retention deadlines. If not specified, the actual current time is used. | — | — |
| github-token | GitHub API token to use | yes | ${{ github.token }} |
| dry-run | Output the list of images that would be deleted, instead of deleting them | yes | false |
Outputs
| name | description |
|---|---|
| deleted-count | Deleted image count |
| deleted-json | Deleted "package versions" as JSON array |