nerdexam
Microsoft

GH-200 · Question #68

Custom environment variables can be defined at multiple levels within a workflow file including: (Each answer presents a complete solution. Choose three.)

The correct answer is A. top level. B. step level. E. job level. In a GitHub Actions workflow YAML file, environment variables can be scoped at three levels: (A) top/workflow level using env: at the root of the workflow file - applies to all jobs and steps; (E) job level using env: under a specific job - applies to all steps within that job…

Author and Maintain Workflows

Question

Custom environment variables can be defined at multiple levels within a workflow file including:

(Each answer presents a complete solution. Choose three.)

Options

  • Atop level.
  • Bstep level.
  • Cdefault level.
  • Drunner level.
  • Ejob level.
  • Fstage level.

How the community answered

(22 responses)
  • A
    86% (19)
  • C
    5% (1)
  • D
    5% (1)
  • F
    5% (1)

Explanation

In a GitHub Actions workflow YAML file, environment variables can be scoped at three levels: (A) top/workflow level using env: at the root of the workflow file - applies to all jobs and steps; (E) job level using env: under a specific job - applies to all steps within that job; (B) step level using env: under a specific step - applies only to that step. 'Default level' (C) and 'stage level' (F) are not valid GitHub Actions scoping levels. 'Runner level' (D) refers to OS-level environment, not a workflow file configuration level.

Topics

#Environment variables#Workflow syntax#GitHub Actions#Workflow levels

Community Discussion

No community discussion yet for this question.

Full GH-200 Practice