Skip to content

Run dependent job even on failure? #25388

Answered by weide-zhou
nirvdrum asked this question in Actions
Discussion options

You must be logged in to vote

Hi @nirvdrum,

You can use a combined if expression in JobD. Code sample as below:

  jobD:
    needs: [jobA, jobB, jobC]                                            #depend on jobA,B,C
    if: "always()&&(needs.jobA.outputs.job_status=='success')"   # check jobA outputs as well.

the workflow will ignore jobB, jobC status and run based on jobA succeeds. Please change the jobA needs outputs according to your situation.

Thanks.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants