nerdexam
GitHub

GITHUB-ACTIONS · Question #24

What is the smallest scope for an environment variable?

The correct answer is B. a step. The smallest scope for an environment variable is within a step. Environment variables defined within a step are only accessible to that particular step, which makes it the smallest scope for a variable in a GitHub Actions workflow.

Use workflow components to automate software development lifecycle

Question

What is the smallest scope for an environment variable?

Options

  • Athe workflow settings
  • Ba step
  • Ca job
  • Dthe workflow env mapping

How the community answered

(42 responses)
  • A
    2% (1)
  • B
    88% (37)
  • C
    2% (1)
  • D
    7% (3)

Explanation

The smallest scope for an environment variable is within a step. Environment variables defined within a step are only accessible to that particular step, which makes it the smallest scope for a variable in a GitHub Actions workflow.

Topics

#environment variables#variable scope#step scope#workflow syntax

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice