Skip to content

Commit

Permalink
feat: ghcr cleanup at build time (#1467)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Oct 6, 2023
1 parent b7c1f0f commit 86cb96d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,3 @@ jobs:
# Remove old build runs, build pods and deployment pods
oc delete po --field-selector=status.phase==Succeeded
ghcr-cleanup:
name: GHCR Cleanup
runs-on: ubuntu-latest
strategy:
matrix:
name: [database, migrations, backend, frontend]
timeout-minutes: 1
steps:
- name: Keep last 50
uses: actions/delete-package-versions@v4
with:
package-name: "${{ github.event.repository.name }}/${{ matrix.name }}"
package-type: "container"
min-versions-to-keep: 50
ignore-versions: "^(prod|test)$"
5 changes: 2 additions & 3 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,22 @@ jobs:
triggers: ('database/')
- package: migrations
build_context: ./backend/db
build_file: ./backend/db/Dockerfile
triggers: ('backend/db')
- package: backend
triggers: ('backend/')
- package: frontend
triggers: ('frontend/')
timeout-minutes: 10
steps:
- uses: bcgov-nr/action-builder-ghcr@v1.2.1
- uses: bcgov-nr/action-builder-ghcr@v1.3.0
with:
keep_versions: 50
package: ${{ matrix.package }}
tag: ${{ github.event.number }}
tag_fallback: test
token: ${{ secrets.GITHUB_TOKEN }}
triggers: ${{ matrix.triggers }}
build_context: ${{ matrix.build_context }}
build_file: ${{ matrix.build_file }}

# https://github.com/bcgov-nr/action-deployer-openshift
deploys:
Expand Down

0 comments on commit 86cb96d

Please sign in to comment.