Handling multiline set-env when command errors out #26405
-
I have the following step defined
In this case, Is there a recommended way to handle this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Depending on the command, there might be a built-in option to disable the non-zero exit code, but as you are interested in this code, one of these options might do what you want:
You can also do one of the following: |
Beta Was this translation helpful? Give feedback.
-
Yea the tricky bit here is that I actually want the step to result in a failed status which I surface in a PR message. I ended up getting passed this by writing the output to a temporary file and reading it the next step.
Then I retrieved the contents in the next step with actions/github-script
|
Beta Was this translation helpful? Give feedback.
Yea the tricky bit here is that I actually want the step to result in a failed status which I surface in a PR message. I ended up getting passed this by writing the output to a temporary file and reading it the next step.
Then I retrieved the contents in the next step with actions/github-script