fix: gh-action db 5

This commit is contained in:
Finn Linck Ryan 2025-12-13 23:09:11 +01:00
parent f7faa37beb
commit e798f36851

View file

@ -21,7 +21,7 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5445:5432
- 5432:5432
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=5s
@ -39,6 +39,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
@ -60,21 +62,13 @@ jobs:
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
- name: Create Docker network
run: docker network create homepagenetwork || true
- name: Connect services to network
run: docker network connect homepagenetwork postgres 2>/dev/null || true
- name: Build and publish Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
network: homepagenetwork
build-args: |
DB_URL=jdbc:postgresql://postgres:5445/homepage
DB_URL=jdbc:postgresql://localhost:5432/homepage
DB_USERNAME=postgres
DB_PASSWORD=postgres
tags: ${{ steps.meta.outputs.tags }}