GitHub Foundations — Question 13
Which scopes are available to define custom environment variables within a workflow file? (Choose three.)
Answer options
- A. the entire workflow, by using env at the top level of the workflow file
- B. all jobs being run on a single Actions runner, by using runner.env at the top of the workflow file
- C. the entire stage, by using env at the top of the defined build stage
- D. within the run attribute of a job step
- E. the contents of a job within a workflow, by using jobs.env
- F. a specific step within a job, by using jobs..steps[*].env
Correct answer: A, E, F
Explanation
The correct scopes for defining custom environment variables include the entire workflow using env at the top level (A), the job contents using jobs.env (E), and specific steps within a job using jobs..steps[*].env (F). Options B and C are incorrect as they do not represent valid scopes for environment variable definitions, and option D is only relevant to job steps, not at a broader scope.