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)- A3% (2)
- C7% (4)
- D87% (53)
- E2% (1)
- F2% (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.