GITHUB-ACTIONS practice question 15 of 15

Without the need to use additional infrastructure, what is the simplest and most maintainable method for configuring a workflow job to provide access to an empty PostgreSQL database?

Full set: 72 questions
Answer options
A: Use service containers with a Postgres database from Docker hub. Correct answer
B: Run the actions/postgres action in a parallel job.
C: It is currently impossible to access the database with GitHub Actions.
D: Dynamically provision and deprovision an environment.
Correct Answer:
A. Use service containers with a Postgres database from Docker hub.
Explanation

GitHub Actions supports the use of service containers, which allows you to spin up a PostgreSQL database (or any other service) in a Docker container during your workflow. You can pull a PostgreSQL image from Docker Hub, and the container will automatically be available to your workflow job. This method requires no additional infrastructure and is easy to configure and maintain, as you simply define the container in the workflow file.

Scroll to Top