From dfd84e0637dda63c0359a07a7161fbfd2a6da738 Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Tue, 20 Aug 2019 15:21:58 -0400 Subject: [PATCH] Update postgres-service.yml --- .github/workflows/postgres-service.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/postgres-service.yml b/.github/workflows/postgres-service.yml index 84aa1ea..4b91c7c 100644 --- a/.github/workflows/postgres-service.yml +++ b/.github/workflows/postgres-service.yml @@ -50,7 +50,8 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: - - 5432:5432 + # will assign a random free host port + - 5432/tcp # needed because the postgres container does not provide a healthcheck options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -64,4 +65,4 @@ jobs: # use postgres for the host here because we have specified a contaienr for the job. # If we were running the job on the VM this would be localhost POSTGRES_HOST: localhost - POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} \ No newline at end of file + POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port