Skip to content

Commit 2bae1a5

Browse files
committed
add clean job
to remove untagged images from the GitHub package registry
1 parent 10d653d commit 2bae1a5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/docker-image.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55

66
jobs:
7-
87
build:
98
runs-on: ubuntu-latest
109
steps:
@@ -38,3 +37,19 @@ jobs:
3837
- name: deploy
3938
run: |
4039
curl -X POST https://keel1.edirom.de/v1/webhooks/native -H 'Content-Type: application/json' -d '{"name": "ghcr.io/edirom/cartographer-app", "tag": "dev"}'
40+
41+
clean:
42+
name: remove untagged images from Github package registry
43+
runs-on: ubuntu-latest
44+
needs: build
45+
permissions:
46+
packages: write
47+
steps:
48+
- name: ghcr.io cleanup action
49+
uses: dataaxiom/ghcr-cleanup-action@v1
50+
with:
51+
delete-untagged: true
52+
dry-run: false
53+
validate: true
54+
older-than: 2 weeks
55+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)