n8n/.github/workflows/util-cleanup-pr-images.yml
Declan Carroll aa12777c61
ci: Fix Docker image cleanup and simplify CI image tagging (#26002)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 07:49:36 +00:00

28 lines
740 B
YAML

name: 'Util: Cleanup CI Docker Images'
on:
schedule:
# Daily cleanup at 3 AM UTC
- cron: '0 3 * * *'
jobs:
cleanup:
name: 'Delete stale CI images'
runs-on: ubuntu-slim
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: .github/scripts
sparse-checkout-cone-mode: false
- name: Delete stale CI images
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GHCR_ORG: ${{ github.repository_owner }}
GHCR_REPO: ${{ github.event.repository.name }}
run: node .github/scripts/cleanup-ghcr-images.mjs --stale 1