Skip to content

Commit

Permalink
feat: delete untagged containers (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Oct 10, 2023
1 parent c51415c commit 703292d
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
# https://github.com/bcgov-nr/action-builder-ghcr
DBs:
builds:
if: "!github.event.pull_request.head.repo.fork"
permissions:
packages: write
Expand All @@ -39,8 +39,22 @@ jobs:
token: ${{ github.token }}
triggers: database/${{ matrix.package}}/${{ matrix.triggers }}

Wrap-up:
needs: [DBs]
ghcr-cleanup:
needs: [builds]
runs-on: ubuntu-22.04
strategy:
matrix:
package: [postgres/postgres, postgis/postgis, bitnami/postgres]
steps:
- uses: actions/delete-package-versions@v4
with:
package-name: ${{ github.event.repository.name }}/${{ matrix.package }}
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'

wrap-up:
needs: [ghcr-cleanup]
runs-on: ubuntu-22.04
steps:
- name: Wrap-up
Expand Down

0 comments on commit 703292d

Please sign in to comment.