Step Conditions
Theif: field on a step controls whether it runs, based on the job’s current status.
success() (default)
A step with no if: field — or with if: success() — runs only when no previous step
in the job has failed:
failure()
Runs only when a previous step has failed:
always()
Runs regardless of prior step status — useful for cleanup:
continue-on-error
When a step has continue-on-error: true, a non-zero exit code does not mark the
job as failed. Subsequent steps still see a success() status:
continue-on-error, a failing step causes all remaining steps (except those
with if: failure() or if: always()) to be skipped, and the job is marked as failed.
Combining Conditions and continue-on-error
- If
test.shfails, “Always report” runs, and “On success only” also runs (becausecontinue-on-errorprevented the job from entering a failed state) - If
Setupfails, “Flaky test” is skipped, “Always report” runs, “On success only” is skipped
Job-Level Failure
When a step fails (withoutcontinue-on-error), the job finishes with a failure
status. Any downstream jobs that needs: this job are skipped.
See Job Dependencies for details on failure propagation
across the DAG.