Skip to content

chore: add db-2 ticketsystem #1

chore: add db-2 ticketsystem

chore: add db-2 ticketsystem #1

name: "PG Ticket-System: Build & Push Container Image"
on:
push:
branches:
- main
paths:
- 'postgres/**'
- '.github/workflows/build-container.yml'
- '.github/workflows/build-pg-ticket-system.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/ticket_system.Dockerfile | sed -E 's|.*postgres:([0-9]+\.[0-9]+).*|\1|')" >> $GITHUB_OUTPUT
call-build-workflow:
name: Build & Push
needs: get-version
uses: erhardtconsulting/database-development/.github/workflows/build-container.yml@main
with:
context: "postgres"
dockerfile: "postgres/ticket_system.Dockerfile"
image: "database-development"
tag: ticket-system-${{ needs.get-version.outputs.postgres }}
latest: false
push: true
secrets: inherit