Microsoft

GH-200 practice question 5

GitHub Actions · free question 5 of 20

Question

As a developer, you need to leverage Redis in your workflow. What is the best way to use Redis on a self-hosted Linux runner without affecting future workflow runs?
  • A. Install Redis on the hosted runner image and place it in a runner group. Specify label: in your job to target the runner group.
  • B. Set up Redis on a separate machine and reference that instance from your job.
  • C. Specify container: and services: in your job definition to leverage a Redis service container. Correct
  • D. Add a run step to your workflow, which dynamically installs and configures Redis as part of your job.

Explanation

A Redis service container is created fresh for the job and destroyed when the job completes, so nothing is left behind on the self-hosted runner for future runs; self-hosted runners only need to be Linux machines with Docker installed. Installing Redis on the runner image or with a run step changes the persistent runner state, and a separate shared Redis machine keeps data between runs.

Practice the whole free set

Answer all 20 free GH-200 questions with instant feedback, or unlock all 106 questions with Learn and Exam modes.