fix: missing gh-action postgres instance

This commit is contained in:
Finn Linck Ryan 2025-12-13 22:07:58 +01:00
parent 42bccd95de
commit baf2e0b8cc

View file

@ -13,6 +13,21 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: homepage
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=5s
--health-timeout=5s
--health-retries=10
permissions: permissions:
contents: read contents: read
packages: write packages: write
@ -50,6 +65,11 @@ jobs:
with: with:
context: . context: .
push: true push: true
network: host
build-args: |
DB_URL=jdbc:postgresql://localhost:5432/homepage
DB_USERNAME=postgres
DB_PASSWORD=postgres
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha