Replies: 2 comments 2 replies
-
My usecase: We push a public image for every PR merge which can happen several times per day. Some of these images are used in production but the majority probably isn't. Therefore I'm looking for a way to specify that images older than X days that have 0 pulls are to be deleted. |
Beta Was this translation helpful? Give feedback.
1 reply
-
other than 3rd parties tools, can we count on officially supported tool from GitHub ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Product Feedback
Body
Some container registries provide built-in ways to apply a Retention Policy for the images/tags/manifests they host, specifically what to clean from the registry and when to do it.
As @sondrelg writes elsewhere, this is a built-in feature in Azure for example:
Numerous actions have emerged to facilitate similar features for GHCR:
However, the requirement for Personal Access Tokens complicates their usage:
While being able to utilize the
GITHUB_TOKEN
for pruning from (as well as pushing to) the container registry would considerably simplify the deployment of such Retention Policies, it seems current API endpoints do not yet support this.On a side note: one specific type of Retention Policy I would like to apply would be a form of temporal down-sampling, where image tags archived in the registry would be selectively pruned by their age over multiple time horizons. This would allow for varying densities of archived images based upon different windows of relevance, irregardless of the frequency at which newer images may be generated or updated. For example:
This kind of Retention Policy seems tricky to construct from existing actions available through the marketplace, given that most can only filter by a single sided cutoff window, and thus are not easily composable.
Beta Was this translation helpful? Give feedback.
All reactions