I don't find it in the code. And there is a test that claims to test it but actually does not:
Has the neutral exit code been removed from actios altogether?
Has the neutral exit code been removed from actios altogether?
My guess is that Actions doesn't handle other exit codes yet and so this functionality is not yet available. The test seems to have been added like that. This is when it was first commit.
https://github.com/actions/toolkit/commit/a526749ce96e66c4e8c32ddc43f099c6830d0345#diff-ce52518b05efe344d702cb7e7d01da6aR38-R41
I would really love a neutral exit code.
馃憢 the service has a GA item to respect neutral code. The toolkit doesn't implement. That test was a copy past that just tests failure.
A bit on history - actions v2 has a status of skipped. It was asserted that's what we needed. However, skipped is more about conditions on steps and jobs where it never executes (your action code never enters). Neutral is more about you got into the action code and the code has determined that work is not relevant.
There's another effort around smarter triggers / conditions etc. to ensure compute is not allocated just to short circuit for common cases (branches, paths etc.).
I'm going to mark this external (waiting on service changes) and enhancement (since there is not real toolkit path) and then follow up here.
Hope that makes sense.
Is the exit code 78 still supported or should we refrain from using it at this point?
Neutral (78) is not respected right now but there's plans to add before GA. There's discussions around whether it's 78. This toolkit was waiting on that before adding the method.
@ethomson
Is the exit code 78 still supported or should we refrain from using it at this point?
I'd refrain from using it. I'd like to switch to some unambiguous out-of-band mechanism for signalling neutral continuation. (eg, ::set-status neutral)
This action uses exit 78 in its entrypoint, but, how would one accomplish something like ::set-status neutral to stop the following actions? Is there a ::set-status pass or skip or something?
@JaKXz it looks like the readme was updated to include the example to use job.<job_id>.if condition to skip a job
note, steps also allow if conditions.
@bryanmacfarlane is https://github.community/t5/GitHub-Actions/bd-p/actions the correct place for this request?
looks like here is the github community issue https://github.community/t5/GitHub-Actions/GitHub-Actions-quot-neutral-quot-exit-code-is-incorrectly/td-p/29051
Most helpful comment
I would really love a neutral exit code.