ANIL BABU
ANIL BABU
name:%20PostgreSQL%20service%20example%0Aon%3A%20push%0A%0Ajobs%3A%0A%20%20%23%20Label%20of%20the%20container%20job%0A%20%20container-job:%0A%20%20%20%20%23%20Containers%20must%20run%20in%20Linux%20based%20operating%20systems%0A%20%20%20%20runs-on:%20ubuntu-latest%0A%20%20%20%20%23%20Docker%20Hub%20image%20that%20%60container-job%60%20executes%20in%0A%20%20%20%20container:%20node:20-bookworm-slim%0A%0A%20%20%20%20%23%20Service%20containers%20to%20run%20with%20%60container-job%60%0A%20%20%20%20services:%0A%20%20%20%20%20%20%23%20Label%20used%20to%20access%20the%20service%20container%0A%20%20%20%20%20%20postgres:%0A%20%20%20%20%20%20%20%20%23%20Docker%20Hub%20image%0A%20%20%20%20%20%20%20%20image:%20postgres%0A%20%20%20%20%20%20%20%20%23%20Provide%20the%20password%20for%20postgres%0A%20%20%20%20%20%20%20%20env:%0A%20%20%20%20%20%20%20%20%20%20POSTGRES_PASSWORD:%20postgres%0A%20%20%20%20%20%20%20%20%23%20Set%20health%20checks%20to%20wait%20until%20postgres%20has%20started%0A%20%20%20%20%20%20%20%20options:%20%3E-%0A%20%20%20%20%20%20%20%20%20%20--health-cmd%20pg_isready%0A%20%20%20%20%20%20%20%20%20%20--health-interval%2010s%0A%20%20%20%20%20%20%20%20%20%20--health-timeout%205s%0A%20%20%20%20%20%20%20%20%20%20--health-retries%205%0A%0A%20%20%20%20steps:%0A%20%20%20%20%20%20%23%20Downloads%20a%20copy%20of%20the%20code%20in%20your%20repository%20before%20running%20CI%20tests%0A%20%20%20%20%20%20-%20name:%20Check%20out%20repository%20code%0A%20%20%20%20%20%20%20%20uses:%20actions/checkout@v5%0A%0A%20%20%20%20%20%20%23%20Performs%20a%20clean%20installation%20of%20all%20dependencies%20in%20the%20%60package.json%60%20file%0A%20%20%20%20%20%20%23%20For%20more%20information,%20see%20https://docs.npmjs.com/cli/ci.html%0A%20%20%20%20%20%20-%20name:%20Install%20dependencies%0A%20%20%20%20%20%20%20%20run:%20npm%20ci%0A%0A%20%20%20%20%20%20-%20name:%20Connect%20to%20PostgreSQL%0A%20%20%20%20%20%20%20%20%23%20Runs%20a%20script%20that%20creates%20a%20PostgreSQL%20table,%20populates%0A%20%20%20%20%20%20%20%20%23%20the%20table%20with%20data,%20and%20then%20retrieves%20the%20data.%0A%20%20%20%20%20%20%20%20run:%20node%20client.js%0A%20%20%20%20%20%20%20%20%23%20Environment%20variables%20used%20by%20the%20%60client.js%60%20script%20to%20create%20a%20new%20PostgreSQL%20table.%0A%20%20%20%20%20%20%20%20env:%0A%20%20%20%20%20%20%20%20%20%20%23%20The%20hostname%20used%20to%20communicate%20with%20the%20PostgreSQL%20service%20container%0A%20%20%20%20%20%20%20%20%20%20POSTGRES_HOST:%20postgres%0A%20%20%20%20%20%20%20%20%20%20%23%20The%20default%20PostgreSQL%20port%0A%20%20%20%20%20%20%20%20%20%20POSTGRES_PORT:%205432%0A