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."
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
-
-
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()
-
I know
@pietroalbini was working on something fancy using YAML anchors and a rust program to expand them, for the rust-lang/rust CI. Perhaps he has ideas?
Kraj razgovora
Novi razgovor -
-
-
e.g. https://github.com/rust-lang/rustup/blob/master/.github/workflows/linux-builds-on-pr.yaml#L24 … chooses to run the tests, and https://github.com/rust-lang/rustup/blob/master/.github/workflows/linux-builds-on-pr.yaml#L47 … conditionalises that particular part of the workflow on it
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.