Skip to content

ci(github-action): pin erhardtconsulting/relational-databases action to 2436c80 #227

ci(github-action): pin erhardtconsulting/relational-databases action to 2436c80

ci(github-action): pin erhardtconsulting/relational-databases action to 2436c80 #227

name: "PG Vereinsdatenbank: Build Container Image / Pull Request"
on:
pull_request:
branches:
- main
paths:
- 'postgres/**'
- '.github/workflows/build-container.yml'
- '.github/workflows/build-pg-verein.yml'
permissions:
contents: read
packages: write
jobs:
get-version:
runs-on: ubuntu-24.04
outputs:
postgres: ${{ steps.postgres_version.outputs.POSTGRES_VERSION }}
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Get Postgres version
id: postgres_version
run: |
echo "POSTGRES_VERSION=$(grep -E '^FROM docker.io/library/postgres:[0-9]+\.[0-9]+' postgres/verein.Dockerfile | sed -E 's|.*postgres:([0-9]+\.[0-9]+).*|\1|')" >> $GITHUB_OUTPUT
call-build-workflow:
name: Build & Push
needs: get-version
uses: erhardtconsulting/relational-databases/.github/workflows/build-container.yml@4386f3f9c15e60e7caf2ac639814a220d2d5e03f # main
with:
context: "postgres"
dockerfile: "postgres/verein.Dockerfile"
tag: vereindb-${{ needs.get-version.outputs.postgres }}
latest: false
push: false
secrets: inherit