Skip to content

Run next step even though previous fails #26982

Answered by Yanjingzhu
Segelzwerg asked this question in Actions
Discussion options

You must be logged in to vote

Hi @segelzwerg , 

You could use next code in the if conditional in “Test Deep RL” step: 

if: "success() || steps.test_brain.outcome == 'failure' "

When you use expressions in an if conditional, you may omit the expression syntax (${{ }}) because GitHub automatically evaluates the if conditional as an expression.

And possible values of step outcome are success, failure, cancelled, or skipped. failure() is a function which returns true when any previous step of a job fails.  So just use ‘failure’ instead of ‘failure()’ could work for you.  

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback
3 participants