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 <cursoragent@cursor.com>
This commit is contained in:
defiQUG
2026-05-11 21:05:19 -07:00
parent 8990270e70
commit c7f98be0cb

View File

@@ -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