Microsoft

GH-200 practice question 18

GitHub Actions · free question 18 of 20

Question

What is the smallest scope for an environment variable?
  • A. the workflow settings
  • B. the workflow env mapping
  • C. a job
  • D. a step Correct

Explanation

Environment variables can be set in the workflow env mapping, in a job, or in a single step (jobs.<job_id>.steps[*].env). A variable defined in a step exists only for that step and overrides job-level and workflow-level variables with the same name, which makes the step the smallest scope. A job-level variable applies to every step in the job, and the workflow env mapping applies to all jobs.

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.