snok/Container Retention Policy

Define a retention policy for your GHCR-hosted container images

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
accountShould be 'user' for personal accounts and the organization name for organizations.yes
tokenGitHub access token used to authenticate towards the GitHub packages APIs.yes
cut-offThe cut-off for which to delete images older than. For example '2d' for 2 days.yes
image-namesList of package names to consider.yes
image-tagsList of package version names to consider.no
skip-shasPackage version SHAs to not delete.no""
tag-selectionSpecify whether to consider tagged images, untagged images, or both.noboth
keep-n-most-recentHow many image versions to always retain. Newer package versions are prioritized.no0
timestamp-to-useWhether to use `updated_at` or `created_at` timestamps when considering the cut-off.noupdated_at
dry-runDo not actually delete images. Instead, print which images would have been deleted to the console.nofalse
rust-logLets you specify a log level or a list of log levels for the different Rust crates used by the action.nocontainer_retention_policy=INFO
namedescription
deletedComma-separated list of image names and tags, for image versions that were deleted during the run.
failedComma-separated list of image names and tags, for image versions that we failed to delete during the run, for an unknown reason.