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_PASSWORD: ${{ inputs.postgres_password }}
|
||||||
POSTGRES_DB: ${{ inputs.postgres_db }}
|
POSTGRES_DB: ${{ inputs.postgres_db }}
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd="${{ inputs.postgres_health_cmd }}"
|
--health-cmd="${{ inputs.postgres_health_cmd }}"
|
||||||
--health-interval=${{ inputs.postgres_health_interval }}
|
--health-interval=${{ inputs.postgres_health_interval }}
|
||||||
@@ -114,6 +114,13 @@ jobs:
|
|||||||
--health-interval=${{ inputs.redis_health_interval }}
|
--health-interval=${{ inputs.redis_health_interval }}
|
||||||
--health-timeout=${{ inputs.redis_health_timeout }}
|
--health-timeout=${{ inputs.redis_health_timeout }}
|
||||||
--health-retries=${{ inputs.redis_health_retries }}
|
--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:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
defaults:
|
defaults:
|
||||||
|
|||||||
Reference in New Issue
Block a user