I have set-up an action to prune old untagged images as follows:
name: Delete old container images
on:
schedule:
- cron: "0 2 * * 2" # This job runs every Tuesday
workflow_dispatch:
jobs:
clean-ghcr:
name: Delete old unused container images
runs-on: ubuntu-22.04
if: github.repository_owner == 'bcgov'
steps:
- name: Delete container images older than a Month
uses: snok/container-retention-policy@v3.0.0
with:
account: bcgov
image-names: traction-plugins-acapy, traction-tenant-proxy, traction-tenant-ui
cut-off: 1month
tag-selection: untagged
token: ${{ secrets.GITHUB_TOKEN }}
My expectation would be for the action to only delete images that do not have an explicit tag and are older than one month, however it appears that it is also removing other images as well, possibly layers that are required by tagged images. The symptom we're experiencing is that the image tag is available in the GHCR, however trying to pull the tagged image results in a manifest unknown error.
I have set-up an action to prune old untagged images as follows:
My expectation would be for the action to only delete images that do not have an explicit tag and are older than one month, however it appears that it is also removing other images as well, possibly layers that are required by tagged images. The symptom we're experiencing is that the image tag is available in the GHCR, however trying to pull the tagged image results in a
manifest unknownerror.