refactor: inline database environment variable exports
This commit is contained in:
@@ -6,12 +6,6 @@ on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
env:
|
||||
# WHY?: services are executed way before the env can be sourced from .env file
|
||||
DB_NAME: piku_test_db
|
||||
DB_USER: test
|
||||
DB_PASSWORD: password123
|
||||
|
||||
jobs:
|
||||
setup-environment:
|
||||
name: Generate Certificates
|
||||
@@ -40,10 +34,9 @@ jobs:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_DB: ${{ env.DB_NAME }}
|
||||
POSTGRES_USER: ${{ env.DB_USER }}
|
||||
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
|
||||
PGDATA: /var/lib/postgresql/data/pgdata
|
||||
POSTGRES_DB: piku_test_db
|
||||
POSTGRES_USER: test
|
||||
POSTGRES_PASSWORD: password123
|
||||
ports:
|
||||
- 5442:5432
|
||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
@@ -69,6 +62,10 @@ jobs:
|
||||
cp ../.env.example ../.env
|
||||
uv sync
|
||||
|
||||
export DB_NAME="piku_test_db"
|
||||
export DB_USER="test"
|
||||
export DB_PASSWORD="password123"
|
||||
|
||||
if [ "$GITEA_ACTIONS" = "true" ]; then
|
||||
export DB_HOST="postgres"
|
||||
export DB_PORT="5432"
|
||||
|
||||
Reference in New Issue
Block a user