Compare commits

...
Author SHA1 Message Date
Meo597 9748e00535 cleanup docker images 2026-10-30 06:31:06 +08:00
2 changed files with 60 additions and 0 deletions
@@ -0,0 +1,28 @@
name: Cleanup dangling 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:
# Untagged architecture manifests can still belong to a tagged image.
- name: Delete untagged and unreferenced versions
uses: dataaxiom/ghcr-cleanup-action@d52806a0dc70b430571a37da1fde39733ffd640f # v1.2.2
with:
delete-untagged: true
dry-run: ${{ inputs.dry_run }}
+32
View File
@@ -0,0 +1,32 @@
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 }}