From c7f98be0cbb12fe3483a0fb9578863177fb11ec1 Mon Sep 17 00:00:00 2001 From: defiQUG Date: Mon, 11 May 2026 21:05:19 -0700 Subject: [PATCH] fix(ci): use postgres service hostname for DATABASE_URL on containerized runners Gitea act_runner runs jobs in Docker; use the services: postgres hostname, not localhost. Co-authored-by: Cursor --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c7d391..2fcc219 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,9 +60,10 @@ jobs: --health-retries 5 ports: - 5432:5432 + # Hostname must match `services:` id. `localhost` breaks Gitea act_runner (Docker job). env: - DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test - TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test + DATABASE_URL: postgresql://postgres:postgres@postgres:5432/test + TEST_DATABASE_URL: postgresql://postgres:postgres@postgres:5432/test steps: - name: Checkout code uses: actions/checkout@v4