Skip to content

Commit

Permalink
ci(image): add config to delete PR-scoped images on close (#1176)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores authored Oct 26, 2022
1 parent 944ad97 commit aab8d34
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/image-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Clean up PR-scoped test images

on:
pull_request:
types:
- closed

jobs:
delete-images:
name: Delete PR-scoped test images
runs-on: ubuntu-latest
steps:
- uses: r26d/ghcr-delete-image-action@v1.2.2
with:
owner: ${{ github.repository_owner }}
name: cryostat
token: ${{ secrets.GHCR_PR_TOKEN }}
ignore-missing-package: true
tag-regex: pr-${{ github.event.number }}-.*
tagged-keep-latest: 0
if: github.repository_owner == 'cryostatio'

0 comments on commit aab8d34

Please sign in to comment.