Skip to content

Commit

Permalink
add clean job
Browse files Browse the repository at this point in the history
to remove untagged images from the GitHub package registry
  • Loading branch information
peterstadler committed Oct 2, 2024
1 parent 10d653d commit 2bae1a5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:

jobs:

build:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -38,3 +37,19 @@ jobs:
- name: deploy
run: |
curl -X POST https://keel1.edirom.de/v1/webhooks/native -H 'Content-Type: application/json' -d '{"name": "ghcr.io/edirom/cartographer-app", "tag": "dev"}'
clean:
name: remove untagged images from Github package registry
runs-on: ubuntu-latest
needs: build
permissions:
packages: write
steps:
- name: ghcr.io cleanup action
uses: dataaxiom/ghcr-cleanup-action@v1
with:
delete-untagged: true
dry-run: false
validate: true
older-than: 2 weeks
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 2bae1a5

Please sign in to comment.