Actions neutral exit strategy

A while back there was some talk about a “neutral exit strategy”. I.e., exiting either a single job (or maybe entire workflow) early without failing.

In the early days there was a neutral exit code. It was removed.

Anyone know if…

  1. Something similar is currently available?
  2. If not, are there future plans to add such a feature? If so, any public roadmap item or ticket to track?



Hello. :wave:

Not sure if this is relevant, but, this is something I found a while back, it’s a skip ci check that fails the workflow if [skip ci] is found.

    runs-on: ubuntu-latest
    if: |
      !contains(format('{0} {1} {2}', github.event.head_commit.message, github.event.pull_request.title, github.event.pull_request.body), '[skip ci]')
      - run: |
          cat <<'MESSAGE'
          github.event_name: ${{ toJson(github.event_name) }}
          ${{ toJson(github.event) }}

The only real “catch” is that the other jobs needs: check_skip to check if they should run, so if [skip ci] is found, the other jobs won’t run.

Hope that’s somewhat relevant. :slightly_smiling_face:


Thank you @thinkverse … that is relevant. But I’m hoping there is something on the roadmap to have this as a built-in feature instead.

In the early days (and in other CI systems) its as simple as “exit code 78” or equivalent.

Github does have a public roadmap - look in issues and projects, you can look at to see if it’s on the docket or not, if it’s not I do believe they accept feature requests here on the forums. :+1:

1 Like