Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions .github/workflows/cleanup-ghcr-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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
Comment thread
pront marked this conversation as resolved.
num-old-versions-to-delete: 100
Loading