Can you have a job "fail" but not fail the workflow? #56441
-
Select Topic AreaQuestion BodyI have a workflow that runs after a pull request is accepted into the default branch. I know about job dependency but those seem to all require that job1 succeed. However, I don't want Job1 to report a fail because then that marks the workflow as failed even though it isn't a true "Failure". Is there a way to have subsequent jobs depend on an earlier job but not have the earlier job fail? OR have it fail but somehow not have the workflow itself marked as "failed"? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes. The natural thing to do would be to have your job1 set a job output that tells the other jobs if they should run (instead of failing), and then add |
Beta Was this translation helpful? Give feedback.
Yes. The natural thing to do would be to have your job1 set a job output that tells the other jobs if they should run (instead of failing), and then add
if
conditions using that output on the other jobs.