Skip to content

Commit 415fab7

Browse files
committed
Cleanup untagged images on the GitHub Container Registry (#191)
1 parent f827f3d commit 415fab7

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed

.github/workflows/alpine-mainline.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ jobs:
376376
NOTARY_TARGETS_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
377377

378378
cleanup:
379-
name: Delete untagged Alpine NGINX mainline Docker images on the Amazon ECR Public Gallery
379+
name: Delete untagged Alpine NGINX mainline Docker images on the Amazon ECR Public Gallery and the GitHub Container Registry
380380
if: ${{ github.event_name != 'pull_request' }}
381381
runs-on: ubuntu-22.04
382382
strategy:
@@ -396,3 +396,12 @@ jobs:
396396
- name: Delete untagged Alpine NGINX mainline Docker images on the Amazon ECR Public Gallery
397397
run: |
398398
.github/workflows/scripts/delete-untagged-amazon-public-ecr-images.sh
399+
400+
- name: Delete untagged Alpine NGINX mainline Docker images on the GitHub Container Registry
401+
uses: stumpylog/image-cleaner-action/untagged@9255a1b3b8ca44b3e5887e2168155223b277ca1d # v0.5.0
402+
with:
403+
is_org: true
404+
owner: nginxinc
405+
package_name: nginx-unprivileged
406+
do_delete: true
407+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/alpine-stable.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ jobs:
352352
NOTARY_TARGETS_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
353353

354354
cleanup:
355-
name: Delete untagged Alpine NGINX stable Docker images on the Amazon ECR Public Gallery
355+
name: Delete untagged Alpine NGINX stable Docker images on the Amazon ECR Public Gallery and the GitHub Container Registry
356356
if: ${{ github.event_name != 'pull_request' }}
357357
runs-on: ubuntu-22.04
358358
strategy:
@@ -372,3 +372,12 @@ jobs:
372372
- name: Delete untagged Alpine NGINX stable Docker images on the Amazon ECR Public Gallery
373373
run: |
374374
.github/workflows/scripts/delete-untagged-amazon-public-ecr-images.sh
375+
376+
- name: Delete untagged Alpine NGINX stable Docker images on the GitHub Container Registry
377+
uses: stumpylog/image-cleaner-action/untagged@9255a1b3b8ca44b3e5887e2168155223b277ca1d # v0.5.0
378+
with:
379+
is_org: true
380+
owner: nginxinc
381+
package_name: nginx-unprivileged
382+
do_delete: true
383+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/debian-mainline.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ jobs:
261261
NOTARY_TARGETS_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
262262

263263
cleanup:
264-
name: Delete untagged Debian NGINX mainline Docker images on the Amazon ECR Public Gallery
264+
name: Delete untagged Debian NGINX mainline Docker images on the Amazon ECR Public Gallery and the GitHub Container Registry
265265
if: ${{ github.event_name != 'pull_request' }}
266266
runs-on: ubuntu-22.04
267267
strategy:
@@ -281,3 +281,12 @@ jobs:
281281
- name: Delete untagged Debian NGINX mainline Docker images on the Amazon ECR Public Gallery
282282
run: |
283283
.github/workflows/scripts/delete-untagged-amazon-public-ecr-images.sh
284+
285+
- name: Delete untagged Debian NGINX mainline Docker images on the GitHub Container Registry
286+
uses: stumpylog/image-cleaner-action/untagged@9255a1b3b8ca44b3e5887e2168155223b277ca1d # v0.5.0
287+
with:
288+
is_org: true
289+
owner: nginxinc
290+
package_name: nginx-unprivileged
291+
do_delete: true
292+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/debian-stable.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ jobs:
245245
NOTARY_TARGETS_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
246246

247247
cleanup:
248-
name: Delete untagged Debian NGINX stable Docker images on the Amazon ECR Public Gallery
248+
name: Delete untagged Debian NGINX stable Docker images on the Amazon ECR Public Gallery and the GitHub Container Registry
249249
if: ${{ github.event_name != 'pull_request' }}
250250
runs-on: ubuntu-22.04
251251
strategy:
@@ -265,3 +265,12 @@ jobs:
265265
- name: Delete untagged Debian NGINX stable Docker images on the Amazon ECR Public Gallery
266266
run: |
267267
.github/workflows/scripts/delete-untagged-amazon-public-ecr-images.sh
268+
269+
- name: Delete untagged Debian NGINX stable Docker images on the GitHub Container Registry
270+
uses: stumpylog/image-cleaner-action/untagged@9255a1b3b8ca44b3e5887e2168155223b277ca1d # v0.5.0
271+
with:
272+
is_org: true
273+
owner: nginxinc
274+
package_name: nginx-unprivileged
275+
do_delete: true
276+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)