Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a package cleanup CI workflow to prevent packages from accumulating #11

Merged
merged 1 commit into from
Nov 1, 2024
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
88 changes: 88 additions & 0 deletions .github/workflows/package-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: PackageCleanup

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
cleanup-packages:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
-
name: Remove untagged versions of dockerslurmcluster/slurm-frontend
uses: actions/delete-package-versions@v5
with:
package-name: 'dockerslurmcluster/slurm-frontend'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'
-
name: Remove untagged versions of dockerslurmcluster/slurm-master
uses: actions/delete-package-versions@v5
with:
package-name: 'dockerslurmcluster/slurm-master'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'
-
name: Remove untagged versions of dockerslurmcluster/slurm-node
uses: actions/delete-package-versions@v5
with:
package-name: 'dockerslurmcluster/slurm-node'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'
-
name: Remove untagged versions of dockerslurmcluster/frontend-cache-amd64
uses: actions/delete-package-versions@v5
with:
package-name: 'dockerslurmcluster/frontend-cache-amd64'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'
-
name: Remove untagged versions of dockerslurmcluster/frontend-cache-arm64
uses: actions/delete-package-versions@v5
with:
package-name: 'dockerslurmcluster/frontend-cache-arm64'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'
-
name: Remove untagged versions of dockerslurmcluster/master-cache-amd64
uses: actions/delete-package-versions@v5
with:
package-name: 'dockerslurmcluster/master-cache-amd64'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'
-
name: Remove untagged versions of dockerslurmcluster/master-cache-arm64
uses: actions/delete-package-versions@v5
with:
package-name: 'dockerslurmcluster/master-cache-arm64'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'
-
name: Remove untagged versions of dockerslurmcluster/node-cache-amd64
uses: actions/delete-package-versions@v5
with:
package-name: 'dockerslurmcluster/node-cache-amd64'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'
-
name: Remove untagged versions of dockerslurmcluster/node-cache-arm64
uses: actions/delete-package-versions@v5
with:
package-name: 'dockerslurmcluster/node-cache-arm64'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'