nerdexam
GitHub

GITHUB-ACTIONS · Question #17

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?

The correct answer is A. Use service containers with a Postgres database from Docker hub.. 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 w

Author and maintain workflows

Question

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?

Options

  • AUse service containers with a Postgres database from Docker hub.
  • BRun the actions/postgres action in a parallel job.
  • CIt is currently impossible to access the database with GitHub Actions.
  • DDynamically provision and deprovision an environment.

How the community answered

(24 responses)
  • A
    79% (19)
  • B
    4% (1)
  • C
    13% (3)
  • D
    4% (1)

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.

Topics

#service containers#PostgreSQL#Docker Hub#database testing

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice