Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pruning orphaned untagged images #75

Closed
nebfield opened this issue Mar 21, 2023 · 2 comments
Closed

Pruning orphaned untagged images #75

nebfield opened this issue Mar 21, 2023 · 2 comments
Labels
type:question Further information is requested

Comments

@nebfield
Copy link

Hello,

Thanks for making this great action 😄

I have a package with multi-architecture images. Each tag points to an untagged image for each architecture, like:

2ffc7... (dev) <-- a8838... (amd)
    ^------------- 2325c... (arm)

If I push multiple dev images then untagged images will accumulate. The most recently pushed untagged images will correctly point to the dev tag but the others will be orphans. I would like to prune these orphaned and untagged images.

Do you think your action could be extended to support this use case?

Thanks,
Ben

@vlaurin vlaurin added the type:question Further information is requested label Mar 28, 2023
@vlaurin
Copy link
Owner

vlaurin commented Mar 28, 2023

As it stands, this action supports pruning untagged images. If my understanding is correct, you only want to prune images that are both untagged and orphaned, where "orphaned" means the image SHA digest is not used as a reference in a separate multi-arch image manifest. Is that right?

If it is, then this seems like this would require introspection of image manifests to compile a list of SHAs that are not orphans and should not be pruned. This is beyond the present scope of this action which is purely driven by GitHub's API and remains quite simplistic on purpose to avoid unexpected behaviours. Also, I'm not sure this use case is generic enough to have a place here.

However, if you do want to have a go at it, feel free to fork this action as a starting point.

@nebfield
Copy link
Author

Yes, that's correct.

Thanks for your time and consideration 😄

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type:question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants