I’m using the new GHCR and generating docker images for pull requests so I can deploy to a staging environment per-PR. This works great using GitHub actions but I can’t find a way to delete the generated image tags when a PR is merged.
Based on the Docker Registry API spec it looks like I would need to fetch the manifest digest for the given tag and then delete the manifest. But trying to do this via the GHCR API gives me
The GHCR doc*mentation only describes the process of manually deleting an image and indicates that it may be added to the GraphQL API in the future.
Is there currently a way to delete image tags via code? If not, is this going to be part of the GA release?
EDIT: I had to censor the word “doc*mentation” because the word filter complained that my post has the word “c*m” in it. I guess someone wasn’t aware of the Sc*nthorpe problem (yeah, that triggers it too).