question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command to early-exit the job and set check conclusion

See original GitHub issue

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:

Related issues:

Other CIs:

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:798
  • Comments:37 (1 by maintainers)

github_iconTop GitHub Comments

103reactions
remorsescommented, Oct 9, 2020

This is useful to not repeat the same if statement many times, you can instead do an early exit

70reactions
a-tokyocommented, Sep 24, 2020

This is really useful and is quite needed!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to force to exit in Github Actions step
There is currently no way to exit a job arbitrarily, but there is a way to allow skipping subsequent steps if an earlier...
Read more >
How to force to exit in Github Actions step
There is currently no way to exit a job arbitrarily, but there is a way to allow skipping subsequent steps if an earlier...
Read more >
Python exit commands: quit(), exit(), sys.exit() and os._exit()
We can catch the exception to intercept early exits and perform cleanup activities; if uncaught, the interpreter exits as usual. quit() function ......
Read more >
How to Use the PowerShell Exit Keyword to Terminate ...
The PowerShell exit keyword allows you to terminate scripts without closing your current console session. In this guide, we explain all the ...
Read more >
How to Use the PowerShell Exit Command and Friends
Let's dig into this tutorial and first cover the exit keyword, one of the many reserved words in PowerShell. A reserved word is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found