Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Update clear-stale-docker-images.yml

Matt Kilgorede993f37a4ca
diff --git a/.github/workflows/clear-stale-docker-images.yml b/.github/workflows/clear-stale-docker-images.yml
index 706d0ee5..5f3ffb34 100644
--- a/.github/workflows/clear-stale-docker-images.yml
+++ b/.github/workflows/clear-stale-docker-images.yml
@@ -6,20 +6,50 @@ on:
workflow_dispatch:
jobs:
- delete-untagged-images:
+ delete-old-images-main:
name: Delete Untagged Images
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- - uses: dataaxiom/ghcr-cleanup-action@v1
+ - uses: snok/[email protected]
with:
- dry-run: false
- package: homebox
- delete-ghost-images: true
- delete-orphaned-images: true
- delete-partial-images: true
- delete-untagged: true
- # Make sure to update this to include the latest major tags
- exclude-tags: main,vnext,latest,0.*,1.*
- older-than: 3 months
+ # The type of account. Can be either 'org' or 'personal'.
+ account-type: org
+ # The name of the organization. Only required if the account type is 'personal'.
+ org-name: sysadminsmedia # optional, default is
+ # Image name to delete. Supports passing several names as a comma-separated list.
+ image-names: homebox
+ # The cut-off for which to delete images older than. For example '2 days ago UTC'. Timezone is required.
+ cut-off: 90 days ago UTC
+ # Personal access token with read and delete scopes.
+ token: ${{ secrets.GITHUB_CLEANUP_PAT }}
+ # Restrict deletions to images without specific tags. Supports Unix-shell style wildcards
+ skip-tags: latest,latest-rootless,0.*,0.*-rootless,main,main-rootless,vnext,vnext-rootless,0,0-rootless # optional
+ # Do not actually delete images. Print output showing what would have been deleted.
+ dry-run: true # optional, default is false
+ # The token type. Can be either 'pat' or 'github-token'. If 'github-token', then image-names must the package name of repository from where this action is invoked.
+ token-type: pat # optional, default is pat
+
+ delete-old-images-devcache:
+ name: Delete Cache Old Images
+ runs-on: ubuntu-latest
+ permissions:
+ packages: write
+ steps:
+ - uses: snok/[email protected]
+ with:
+ # The type of account. Can be either 'org' or 'personal'.
+ account-type: org
+ # The name of the organization. Only required if the account type is 'personal'.
+ org-name: sysadminsmedia # optional, default is
+ # Image name to delete. Supports passing several names as a comma-separated list.
+ image-names: devcache
+ # The cut-off for which to delete images older than. For example '2 days ago UTC'. Timezone is required.
+ cut-off: 90 days ago UTC
+ # Personal access token with read and delete scopes.
+ token: ${{ secrets.GITHUB_CLEANUP_PAT }}
+ # Do not actually delete images. Print output showing what would have been deleted.
+ dry-run: true # optional, default is false
+ # The token type. Can be either 'pat' or 'github-token'. If 'github-token', then image-names must the package name of repository from where this action is invoked.
+ token-type: pat # optional, default is pat