soulsync/.github/workflows/cleanup-dev-images.yml
JohnBaumb 7c0f9510c8 Skip Docker/publish workflows on forks
Add repository guard (github.repository == Nezreka/SoulSync) to
cleanup-dev-images, dev-nightly, and docker-publish workflows.
build-and-test stays available for fork contributors.
2026-04-23 09:54:51 -07:00

25 lines
680 B
YAML

name: Cleanup old dev images
on:
schedule:
# Weekly on Sunday at 6 AM UTC
- cron: '0 6 * * 0'
workflow_dispatch:
jobs:
cleanup:
if: github.repository == 'Nezreka/SoulSync'
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Delete old dev image tags
uses: actions/delete-package-versions@v5
with:
package-name: soulsync
package-type: container
min-versions-to-keep: 10
delete-only-pre-release-versions: false
# Only prune tags matching the dev nightly pattern (keep rolling + version tags)
ignore-versions: '^(dev|nightly|latest|\\d+\\.\\d+)$'