fix: gh-action db 4

This commit is contained in:
Finn Linck Ryan 2025-12-13 22:59:48 +01:00
parent 53f9325b63
commit f7faa37beb

View file

@ -60,21 +60,21 @@ jobs:
type=sha,prefix={{branch}}- type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}} type=raw,value=latest,enable={{is_default_branch}}
- name: Wait for PostgreSQL - name: Create Docker network
run: | run: docker network create homepagenetwork || true
until pg_isready -h localhost -p 5445 -U postgres; do
echo "Waiting for postgres..." - name: Connect services to network
sleep 2 run: docker network connect homepagenetwork postgres 2>/dev/null || true
done
- name: Build and publish Docker image - name: Build and publish Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
push: true push: true
network: host network: homepagenetwork
build-args: | build-args: |
DB_URL=jdbc:postgresql://localhost:5445/homepage DB_URL=jdbc:postgresql://postgres:5445/homepage
DB_USERNAME=postgres DB_USERNAME=postgres
DB_PASSWORD=postgres DB_PASSWORD=postgres
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}