ci: prune old container registry tags too
Build containers / fedora-cosmic (rawhide) (push) Failing after 47s
Build containers / fedora-cosmic (44) (push) Successful in 11m4s
Build containers / Prune old releases (push) Failing after 21s

Add prune-registry.sh: keeps the moving tag and newest versioned tag per
distro plus their cosign signature tags, deletes the rest via the Gitea
packages API. Wire it into the prune job (uses REGISTRY_TOKEN).
This commit is contained in:
2026-09-27 20:03:12 +02:00
parent 380d550351
commit a789cb6669
2 changed files with 75 additions and 1 deletions
+11 -1
View File
@@ -135,10 +135,20 @@ jobs:
GITEA_REPO: Misthios/bootc-images
steps:
- name: Install tools
run: dnf install -y nodejs jq curl
run: dnf install -y nodejs jq curl skopeo
- name: Checkout
uses: actions/checkout@v4
- name: Prune old releases
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: ./prune-releases.sh fedora-cosmic
- name: Prune old registry tags
env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
set -xeuo pipefail
authfile=/tmp/prune-auth.json
echo "${REGISTRY_TOKEN}" | skopeo login -u "${REGISTRY_USERNAME}" \
--password-stdin --authfile "${authfile}" git.plabble.org
AUTHFILE="${authfile}" ./prune-registry.sh fedora-cosmic Misthios 44 rawhide