Skip to content

Commit

Permalink
Cleanup untagged images on the GitHub Container Registry (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessfg committed Feb 22, 2024
1 parent f827f3d commit 415fab7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/alpine-mainline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ jobs:
NOTARY_TARGETS_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}

cleanup:
name: Delete untagged Alpine NGINX mainline Docker images on the Amazon ECR Public Gallery
name: Delete untagged Alpine NGINX mainline Docker images on the Amazon ECR Public Gallery and the GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-22.04
strategy:
Expand All @@ -396,3 +396,12 @@ jobs:
- name: Delete untagged Alpine NGINX mainline Docker images on the Amazon ECR Public Gallery
run: |
.github/workflows/scripts/delete-untagged-amazon-public-ecr-images.sh
- name: Delete untagged Alpine NGINX mainline Docker images on the GitHub Container Registry
uses: stumpylog/image-cleaner-action/untagged@9255a1b3b8ca44b3e5887e2168155223b277ca1d # v0.5.0
with:
is_org: true
owner: nginxinc
package_name: nginx-unprivileged
do_delete: true
token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 10 additions & 1 deletion .github/workflows/alpine-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ jobs:
NOTARY_TARGETS_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}

cleanup:
name: Delete untagged Alpine NGINX stable Docker images on the Amazon ECR Public Gallery
name: Delete untagged Alpine NGINX stable Docker images on the Amazon ECR Public Gallery and the GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-22.04
strategy:
Expand All @@ -372,3 +372,12 @@ jobs:
- name: Delete untagged Alpine NGINX stable Docker images on the Amazon ECR Public Gallery
run: |
.github/workflows/scripts/delete-untagged-amazon-public-ecr-images.sh
- name: Delete untagged Alpine NGINX stable Docker images on the GitHub Container Registry
uses: stumpylog/image-cleaner-action/untagged@9255a1b3b8ca44b3e5887e2168155223b277ca1d # v0.5.0
with:
is_org: true
owner: nginxinc
package_name: nginx-unprivileged
do_delete: true
token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 10 additions & 1 deletion .github/workflows/debian-mainline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ jobs:
NOTARY_TARGETS_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}

cleanup:
name: Delete untagged Debian NGINX mainline Docker images on the Amazon ECR Public Gallery
name: Delete untagged Debian NGINX mainline Docker images on the Amazon ECR Public Gallery and the GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-22.04
strategy:
Expand All @@ -281,3 +281,12 @@ jobs:
- name: Delete untagged Debian NGINX mainline Docker images on the Amazon ECR Public Gallery
run: |
.github/workflows/scripts/delete-untagged-amazon-public-ecr-images.sh
- name: Delete untagged Debian NGINX mainline Docker images on the GitHub Container Registry
uses: stumpylog/image-cleaner-action/untagged@9255a1b3b8ca44b3e5887e2168155223b277ca1d # v0.5.0
with:
is_org: true
owner: nginxinc
package_name: nginx-unprivileged
do_delete: true
token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 10 additions & 1 deletion .github/workflows/debian-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ jobs:
NOTARY_TARGETS_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}

cleanup:
name: Delete untagged Debian NGINX stable Docker images on the Amazon ECR Public Gallery
name: Delete untagged Debian NGINX stable Docker images on the Amazon ECR Public Gallery and the GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-22.04
strategy:
Expand All @@ -265,3 +265,12 @@ jobs:
- name: Delete untagged Debian NGINX stable Docker images on the Amazon ECR Public Gallery
run: |
.github/workflows/scripts/delete-untagged-amazon-public-ecr-images.sh
- name: Delete untagged Debian NGINX stable Docker images on the GitHub Container Registry
uses: stumpylog/image-cleaner-action/untagged@9255a1b3b8ca44b3e5887e2168155223b277ca1d # v0.5.0
with:
is_org: true
owner: nginxinc
package_name: nginx-unprivileged
do_delete: true
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 415fab7

Please sign in to comment.