GitHub Actions Practice Test

GitHub Actions Practice Test practice questions, page 3 of 4, with answer review and explanations.

Question 11

While awaiting approval, how many days can a workflow be in the "Waiting" state before it automatically fails?

  1. 7 days
  2. 14 days
  3. 30 days
  4. 60 days

Question 12

When reviewing an action for use, what file defines its available inputs and outputs?

  1. inputs.yml
  2. config.json
  3. defaults.json
  4. workflow.yml
  5. action.yml

Question 13

Custom environment variables can be defined at multiple levels within a workflow file including: (Choose two.)

  1. step level.
  2. default level.
  3. stage level.
  4. top level.
  5. job level.
  6. runner level.

Question 14

How can GitHub Actions encrypted secrets be used in if: conditionals within a workflow job?

  1. Set the encrypted secret as a job-level environment variable and then reference the environment variable within the conditional statement.
  2. Create a job dependency that exposes the encrypted secret as a job output, which can then be leveraged in a subsequent dependent job.
  3. Use the secrets context within the conditional statement, e.g. ${{ secrets.MySuperSecret }}.
  4. Use a workflow command to expose the encrypted secret via a step's output parameter and then use the step output in the job's if: conditional.

Question 15

In which of the following scenarios should you use self-hosted runners? (Choose two.)

  1. when you want to use macOS runners
  2. when a workflow job needs to install software from the local network
  3. when GitHub Actions minutes must be used for the workflow runs
  4. when the workflow jobs must be run on Windows 10
  5. when jobs must run for longer than 6 hours