-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Labels
Description
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)
and other check conclusions.
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?
- How to force to exit in Github Actions step
- How to write a GitHub Action with a neutral Check Run status
- How to perform an early clean exit of a job ?
- Early successful termination of job
- Github Action Skip Steps/Fall Through Syntax
Related issues:
- Has the
setNeutral
method been removed? toolkit#146 - https://github.com/veggiemonk/skip-commit
Other CIs:
- CircleCI:
circleci-agent step halt
- Travis CI:
travis_terminate
- AppVeyor:
appveyor exit
(Linux) - Jenkins:
currentBuild.result
- GitLab CI:
exit 0
xt0rted, wipe2238, sidvishnoi, NeilJed, jtsaito and 881 moremass10, philippemiguet, hsein-bitar, 0xturner, onedr0p and 8 moreAlbertoFemenias, philippemiguet, hsein-bitar, onedr0p, miraclx and 7 moremass10, dongkeren, janniks, c-emil, philippemiguet and 21 morebrettrowberry, alex-v-mihai, manterfield, lucasvazq, tmatsuo and 26 moremass10, fbidu, rzadp, philippemiguet, robert-zaremba and 20 more