Files
Xray-core/.github/workflows/cleanup-sha-images.yml
T
2026-10-30 06:31:06 +08:00

33 lines
948 B
YAML

name: Cleanup sha- container images
on:
workflow_dispatch:
inputs:
dry_run:
description: "Preview only (do not delete image versions)"
type: boolean
default: false
# Share this lock with publishing and the other cleanup workflow.
concurrency:
group: ghcr-images
cancel-in-progress: false
jobs:
cleanup:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
packages: write
steps:
# The repository needs Admin access under the package's Manage Actions access.
- name: Delete versions with only sha- tags
uses: dataaxiom/ghcr-cleanup-action@d52806a0dc70b430571a37da1fde39733ffd640f # v1.2.2
with:
use-regex: true
delete-tags: '^sha-'
# Preserve every non-sha- tag. The colon check avoids matching digests.
exclude-tags: '^(?!sha-)[^:]+$'
delete-untagged: false
dry-run: ${{ inputs.dry_run }}