IssueRaiser

Command to early-exit the job and set check conclusion

**Describe the enhancement** Currently to skip the rest of steps during a job, an `if` condition has to be added to all of steps or steps have to be moved to another job. It'd be nice to have a command to early-exit (premature, prematurely, graceful, gracefully) (end, finish, terminate, termination, stop, halt, skip, cancel, discontinue, fail) the job during a step without failing the job: ``` ::exit:: ``` It'd be also nice to set the conclusion of early-exited job: ``` ::exit::failure ``` (equivalent to `exit 1`) or ``` ::exit::neutral ``` (equivalent to `exit 78` [in Actions v1](https://github.community/t/github-actions-neutral-exit-code-is-incorrectly-interpreted-as-failure/16088)) and [other check conclusions](https://developer.github.com/v3/checks/runs/#parameters). This would help save build time for both GitHub and customers. **Additional information** Related StackOverflow and GitHub Community posts: - [How to fail a job in Github Actions?](https://stackoverflow.com/q/57903836) - [How to force to exit in Github Actions step](https://stackoverflow.com/q/60589373) - [How to write a GitHub Action with a neutral Check Run status](https://stackoverflow.com/q/57687369) - [How to perform an early clean exit of a job ?](https://github.community/t/how-to-perform-an-early-clean-exit-of-a-job/17531) - [Early successful termination of job](https://github.community/t/early-successful-termination-of-job/16500) - [Github Action Skip Steps/Fall Through Syntax](https://stackoverf

Posted by ylemkimon on Aug 16, 2020, 10:40 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

reliability (Software)

Command to early-exit the job and set check conclusion

ylemkimonAug 16, 2020, 10:40 AM

**Describe the enhancement** Currently to skip the rest of steps during a job, an `if` condition has to be added to all of steps or steps have to be moved to another job. It'd be nice to have a command to early-exit (premature, prematurely, graceful, gracefully) (end, finish, terminate, termination, stop, halt, skip, cancel, discontinue, fail) the job during a step without failing the job: ``` ::exit:: ``` It'd be also nice to set the conclusion of early-exited job: ``` ::exit::failure ``` (equivalent to `exit 1`) or ``` ::exit::neutral ``` (equivalent to `exit 78` [in Actions v1](https://github.community/t/github-actions-neutral-exit-code-is-incorrectly-interpreted-as-failure/16088)) and [other check conclusions](https://developer.github.com/v3/checks/runs/#parameters). This would help save build time for both GitHub and customers. **Additional information** Related StackOverflow and GitHub Community posts: - [How to fail a job in Github Actions?](https://stackoverflow.com/q/57903836) - [How to force to exit in Github Actions step](https://stackoverflow.com/q/60589373) - [How to write a GitHub Action with a neutral Check Run status](https://stackoverflow.com/q/57687369) - [How to perform an early clean exit of a job ?](https://github.community/t/how-to-perform-an-early-clean-exit-of-a-job/17531) - [Early successful termination of job](https://github.community/t/early-successful-termination-of-job/16500) - [Github Action Skip Steps/Fall Through Syntax](https://stackoverf

Comments (0)

No comments yet. Start the discussion.

Comment on this issue