Skip to content

feat: analysis revision #44

feat: analysis revision

feat: analysis revision #44

Workflow file for this run

name: PR
on:
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
# PR open and close use the same group, allowing only one at a time
group: pr-${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
# https://github.com/bcgov-nr/action-builder-ghcr
Builds:
if: "!github.event.pull_request.head.repo.fork"
permissions:
packages: write
runs-on: ubuntu-22.04
strategy:
matrix:
package: [bitnami/postgresql, postgres/postgres]
tag: [12, 13, 14, 15, 16]
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Get tag
id: tag
run: |
TAG=$(grep '^FROM' ${{ matrix.package }}/${{ matrix.tag }}/Dockerfile | cut -d':' -f2)
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Build or import
uses: bcgov-nr/[email protected]
with:
build_context: ${{ matrix.package }}/${{ matrix.tag }}
package: ${{ matrix.package }}
tag: ${{ steps.tag.outputs.tag }}
token: ${{ github.token }}
triggers: ${{ matrix.package}}/${{ matrix.triggers }}
ghcr-cleanup:
needs: [Builds]
runs-on: ubuntu-22.04
strategy:
matrix:
package: [bitnami/postgresql, postgres/postgres]
steps:
- uses: actions/delete-package-versions@v4
with:
package-name: ${{ github.event.repository.name }}/${{ matrix.package }}
package-type: 'container'
min-versions-to-keep: 10
delete-only-untagged-versions: 'true'
Analysis:
needs: [Builds]
uses: ./.github/workflows/analysis.yml