A conditional step with a previous output and failure won't run #24941
-
I wrote the following workflow file to invoke upload-artifact if do_test fails and hello.txt is outputted due to do_test. But contrary to what I want, the workflow always skips the last step, shown here. Is there any solution?
|
Beta Was this translation helpful? Give feedback.
Answered by
weide-zhou
May 18, 2020
Replies: 1 comment
-
Hi @utgwkk , The upload-artifact step is not executed due to previous step ‘do_test’ failed. You need to add failure() expression check as well. Code sample as below:
Or you can use ‘continue-on-error’ to make step1 always succeeds. Code as below:
Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @utgwkk ,
The upload-artifact step is not executed due to previous step ‘do_test’ failed. You need to add failure() expression check as well. Code sample as below: