Skip to content

Commit da9d068

Browse files
Update clear-stale-docker-images.yml
1 parent f635bb1 commit da9d068

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/clear-stale-docker-images.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ jobs:
1212
permissions:
1313
packages: write
1414
steps:
15+
- name: Fetch multi-platform package version SHAs
16+
id: multi-arch-digests
17+
run: |
18+
package1=$(docker manifest inspect ghcr.io/sysadminsmedia/homebox | jq -r '.manifests.[] | .digest' | paste -s -d ' ' -)
19+
echo "multi-arch-digests=$package1" >> $GITHUB_OUTPUT
1520
- uses: snok/container-retention-policy@v2.2.1
1621
with:
22+
skip-shas: ${{ steps.multi-arch-digests.outputs.multi-arch-digests }}
1723
# The type of account. Can be either 'org' or 'personal'.
1824
account-type: org
1925
# The name of the organization. Only required if the account type is 'personal'.
@@ -27,7 +33,7 @@ jobs:
2733
# Restrict deletions to images without specific tags. Supports Unix-shell style wildcards
2834
skip-tags: latest,latest-rootless,0.*,0.*-rootless,main,main-rootless,vnext,vnext-rootless,0,0-rootless # optional
2935
# Do not actually delete images. Print output showing what would have been deleted.
30-
dry-run: false # optional, default is false
36+
dry-run: true # optional, default is false
3137
# 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.
3238
token-type: pat # optional, default is pat
3339

0 commit comments

Comments
 (0)