CI: nightly registry cleanup - prune hash images not release-tagged nor a branch head
CI / full-gate (push) Successful in 2m40s
Mirror / github-mirror (push) Successful in 0s

This commit was merged in pull request #6.
This commit is contained in:
2026-07-04 09:18:07 +02:00
parent 058280934b
commit 0644ec8f5a
7 changed files with 212 additions and 7 deletions
+22
View File
@@ -0,0 +1,22 @@
name: Registry cleanup
on:
schedule:
- cron: '43 3 * * *'
workflow_dispatch:
jobs:
prune-stale-images:
runs-on: docker-host
steps:
- uses: actions/checkout@v4.2.2
- name: Delete hash images that are neither release-tagged nor a branch head
env:
REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
REGISTRY_USER: ${{ vars.DOCKER_REGISTRY_USER }}
REPO_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
SERVER_URL: ${{ github.server_url }}
run: |
docker run --rm -v "$PWD:/repo" -w /repo \
-e REGISTRY_TOKEN -e REGISTRY_USER -e REPO_TOKEN -e REPOSITORY -e SERVER_URL \
node:24.16.0-alpine3.24 node registry-cleanup/cleanup.ts