actions-marketplace-validations/GHCR Pruning

GitHub Action to prune/delete container versions from GitHub Container Registry (ghcr.io)

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stalelast commit Feb 9, 2024
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: actions-marketplace-validations/vlaurin_action-ghcr-prune@45006c484f4e7d98c6f6f4c5ba738dd2a441f9c7 # no releases — HEAD as of 2026-07-10

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
tokenSecret access token with scopes `packages:read` and `packages:delete` and write permissions on the targeted containeryes
organizationOrganisation to which the container belongs, mutually exclusive with input `user`no
userUser to which the container belongs, mutually exclusive with input `organization`no
containerName of the container to pruneyes
dry-runWhen `true` prints out matching container versions without pruning themnofalse
older-thanMinimum age in days of container versions to pruneno0
keep-lastCount of most recent, matching containers to exclude from pruningno0
keep-tagsList of tags to exclude from pruning, one per line. Any version with at least one matching tag will be excluded. Matching is exact and case-sensitive. no
keep-tags-regexesList of regular expressions for tags to exclude from pruning, one per line. Each expression will be evaluated against all tags of a version. Any version with at least one tag matching the expression will be excluded from pruning. no
keep-younger-thanMinimum age in days of container versions that will be prunedno0
prune-tags-regexesList of regular expressions for tags to include in pruning, one per line. Each expression will be evaluated against all tags of a version. Any version with at least one tag matching the expression will be included in pruning. no
prune-untaggedWhether untagged container versions should be prunednofalse
untaggedWhether untagged container versions should be prunednofalse
tag-regexRegular expression matching tagged container versions which should be prunedno

no outputs