ci: prune old container registry tags too
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user