In GitHub Actions, does anyone know how to conditionally stop a job early without causing the job to fail? e.g., "For x, y, z in the matrix, only do foo for x, but do foo, bar and baz for x, y and z."
-
-
Replying to @burntsushi5
I've just been adding extra variables to some parts of the matrix and then making certian parts of the job conditional on those. You can see that in rustup's workflows
2 replies 0 retweets 0 likes -
Replying to @dsilverstone
Yeah, I can do that. But when it's a lot of steps, it gets pretty annoying. In pseudo code, I want: for build in [x, y, z]: step1() step2() step3() if build == x: continue step4() step5() step6()
2 replies 0 retweets 0 likes -
Replying to @burntsushi5 @dsilverstone
For rustc's new config I added `if: success() && !env.SKIP_JOB` to every step, and when I wanted to quit early I printed `::set-env name=SKIP_JOB::1` to stdout and exited the step. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#logging-commands …
1 reply 0 retweets 0 likes
Bummer. Thanks. If it ever gets really complicated, then I'll resort to this. @ethomson Might be a nice feature to add!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.