Github Actions - Creating PostgreSQL service containers

发布时间 2023-12-03 12:56:27作者: ZhangZhihuiAAA

 

    # Service containers to run with `container-job`
    services:
      # Label used to access the service container
      postgres:
        # Docker Hub image
        image: postgres
        # Provide the password for postgres
        env:
          POSTGRES_PASSWORD: postgres
        # Set health checks to wait until postgres has started
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

 

 

Copied from: https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers