diff --git a/.github/workflows/cleanup-ghcr-images.yml b/.github/workflows/cleanup-ghcr-images.yml index dced4f4f0d449..885df52f5caa3 100644 --- a/.github/workflows/cleanup-ghcr-images.yml +++ b/.github/workflows/cleanup-ghcr-images.yml @@ -2,8 +2,11 @@ # # This workflow cleans up old images from GitHub Container Registry # to prevent unlimited storage growth. It runs weekly and removes: -# 1. Old dated nightly tags for vector (keeps last ~8) -# 2. Old test-runner versions (keeps 5 most recent) +# 1. Old test-runner versions (keeps 5 most recent) +# +# Note: cleanup of dated vector nightly images requires a token with +# delete:packages scope (GITHUB_TOKEN is insufficient for org-owned +# container packages). This is tracked separately. name: Cleanup GHCR Images @@ -17,19 +20,6 @@ permissions: contents: read # Restrictive default jobs: - cleanup-vector-nightlies: - runs-on: ubuntu-24.04 - permissions: - packages: write # Required to delete package versions from GHCR - steps: - - name: Delete old dated nightly vector images - uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # v5.0.0 - with: - package-name: vector - package-type: container - min-versions-to-keep: 30 - ignore-versions: '^(nightly$|\d+\.\d+)' - cleanup-test-runner: runs-on: ubuntu-24.04 permissions: @@ -38,7 +28,6 @@ jobs: - name: Delete old test-runner images uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # v5.0.0 with: - package-name: test-runner + package-name: vector/test-runner package-type: container min-versions-to-keep: 5 - num-old-versions-to-delete: 100