Twitter | Pretraživanje | |
Andrew Gallant
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."
Reply Retweet Označi sa "sviđa mi se" More
Daniel Silverstone 🏳️‍🌈🇬🇧 10. sij
Odgovor korisniku/ci @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
Reply Retweet Označi sa "sviđa mi se"
Andrew Gallant 10. sij
Odgovor korisniku/ci @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()
Reply Retweet Označi sa "sviđa mi se"
Tamal Saha 10. sij
Odgovor korisniku/ci @burntsushi5
steps.if : build != X for every step from 4-6. I don't know a simpler way.
Reply Retweet Označi sa "sviđa mi se"
Andrew Gallant 11. sij
Odgovor korisniku/ci @tsaha
Bummer. Thanks!
Reply Retweet Označi sa "sviđa mi se"