nerdexam
GitHub

GITHUB-ACTIONS · Question #50

Which statement is true about using default environment variables?

The correct answer is D. The GITHUB_WORKSPACE environment variable should be used to access files from within the. GITHUB_WORKSPACE is a default environment variable in GitHub Actions that points to the directory on the runner where your repository is checked out. This variable allows you to access files within your repository during the workflow.

GitHub Actions - Environment Variables

Question

Which statement is true about using default environment variables?

Options

  • AThe environment variables can be read in workflows using the ENV: variable_name syntax.
  • BThe environment variables created should be prefixed with GITHUB_ to ensure they can be
  • CThe environment variables can be set in the defaults: sections of the workflow
  • DThe GITHUB_WORKSPACE environment variable should be used to access files from within the

How the community answered

(41 responses)
  • A
    7% (3)
  • B
    2% (1)
  • C
    5% (2)
  • D
    85% (35)

Explanation

GITHUB_WORKSPACE is a default environment variable in GitHub Actions that points to the directory on the runner where your repository is checked out. This variable allows you to access files within your repository during the workflow.

Topics

#default environment variables#GITHUB_WORKSPACE#workflow context

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice