Hi, is there a way to emulate an if-else statement for conditional steps?
Currently, is it possible to do that by mirroring the conditions like such:
steps:
- when:
condition: << parameters.win >>
steps:
- run: echo "You won!"
- when:
condition:
not: << parameters.win >>
steps:
- run: echo "You lost!"
But as you see, it’s code duplication, and will make the config hard to read and large.
Is there a something similar to this?
steps:
- when:
condition: << parameters.win >>
steps:
- run: echo "You won!"
else:
steps:
- run: echo "You lost!"