Closed jasonarewhy closed 2 months ago
Hello @jasonarewhy , please let me know if you can update your remote branch with the suggested changes this week. If not I will just create a new PR based on this one. Thank you!
I created this PR to merge these changes ASAP. So I will close this PR.
In order to use CircleCI's common
when
command parameter in orbs, orb commands must have their ownwhen
parameter.Here I'm adding
when
to each command so thaton_success
,on_fail
oralways
can be plumbed through when needed.This is useful in circumstances where you may need to, say, install the Github CLI as part of the steps taken after a CI job failure.
Example
Let's say you're trying to comment on a PR when there's a build failure:
The above
build
job will not work as expected on failure becausegh/setup
will be skipped. The only way around this currently is to add a separategh/setup
step to the build job before you expect any failures, which is very awkward.With this PR change, we can instead do this:
The above will work because gh/setup will still run even if the job itself fails.