nerdexam
GitHub

GITHUB-ACTIONS · Question #27

What can be used to set a failed status of an action from its code?

The correct answer is D. a non-zero exit code. A non-zero exit code is used to set the status of an action to "failed" in GitHub Actions. When the action's script or code exits with a non-zero status, it indicates failure, and GitHub will mark the action as failed.

Create and publish custom GitHub Actions

Question

What can be used to set a failed status of an action from its code?

Options

  • A@actions/github toolkit
  • BJavaScript dist/ folder
  • CDockerfile CMD
  • Da non-zero exit code
  • Eoutput variable
  • Fcomposite run step

How the community answered

(61 responses)
  • A
    3% (2)
  • C
    7% (4)
  • D
    87% (53)
  • E
    2% (1)
  • F
    2% (1)

Explanation

A non-zero exit code is used to set the status of an action to "failed" in GitHub Actions. When the action's script or code exits with a non-zero status, it indicates failure, and GitHub will mark the action as failed.

Topics

#action exit codes#action status#non-zero exit#action failure

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice