From e98f259997437b21a17c8a5f71e69fa07c69b012 Mon Sep 17 00:00:00 2001 From: Dokkae6949 Date: Sat, 13 Dec 2025 22:39:56 +0100 Subject: [PATCH] fix: gh-action db 2 --- .github/workflows/docker-image.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index fa42f09..c3f88d6 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -60,13 +60,21 @@ jobs: type=sha,prefix={{branch}}- type=raw,value=latest,enable={{is_default_branch}} + - name: Wait for PostgreSQL + run: | + until pg_isready -h localhost -p 5432 -U postgres; do + echo "Waiting for postgres..." + sleep 2 + done + - name: Build and publish Docker image uses: docker/build-push-action@v5 with: context: . push: true + network: host build-args: | - DB_URL=jdbc:postgresql://postgres:5445/homepage + DB_URL=jdbc:postgresql://localhost:5445/homepage DB_USERNAME=postgres DB_PASSWORD=postgres tags: ${{ steps.meta.outputs.tags }}