QuestionQ17

Author and manage workflows

What is the correct syntax for referencing the system-provided run-number variable?

  • A ${{var.GITHUB_RUN_NUMBER}}
  • B ${{env.GITHUB_RUN_NUMBER}}
  • C $GITHUB_RUN_NUMBER
  • D ${{GITHUB_RUN_NUMBER}}
  • E $github.run_number
Explanation

GITHUB_RUN_NUMBER is a GitHub Actions default environment variable. Runner shell commands on a Bash/Linux runner reference environment variables as $NAME, so its value is accessed as $GITHUB_RUN_NUMBER. Default GitHub environment variables are not available through the env context. GitHub Actions variables reference

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!