fix: avoid postgres port collisions in workflow
This commit is contained in:
9
.github/workflows/python-uv-ci-with-db.yml
vendored
9
.github/workflows/python-uv-ci-with-db.yml
vendored
@@ -101,7 +101,7 @@ jobs:
|
||||
POSTGRES_PASSWORD: ${{ inputs.postgres_password }}
|
||||
POSTGRES_DB: ${{ inputs.postgres_db }}
|
||||
ports:
|
||||
- 5432:5432
|
||||
- 5432
|
||||
options: >-
|
||||
--health-cmd="${{ inputs.postgres_health_cmd }}"
|
||||
--health-interval=${{ inputs.postgres_health_interval }}
|
||||
@@ -114,6 +114,13 @@ jobs:
|
||||
--health-interval=${{ inputs.redis_health_interval }}
|
||||
--health-timeout=${{ inputs.redis_health_timeout }}
|
||||
--health-retries=${{ inputs.redis_health_retries }}
|
||||
env:
|
||||
POSTGRES_HOST: 127.0.0.1
|
||||
POSTGRES_PORT: ${{ job.services.postgres.ports['5432'] }}
|
||||
POSTGRES_USER: ${{ inputs.postgres_user }}
|
||||
POSTGRES_PASSWORD: ${{ inputs.postgres_password }}
|
||||
POSTGRES_DB: ${{ inputs.postgres_db }}
|
||||
DATABASE_URL: postgres://${{ inputs.postgres_user }}:${{ inputs.postgres_password }}@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/${{ inputs.postgres_db }}
|
||||
permissions:
|
||||
contents: read
|
||||
defaults:
|
||||
|
||||
Reference in New Issue
Block a user