GitHub Action Workflow with a job conditioned by:
if: |
(needs.changed.outputs.stack_workspace) &&
(
(github.event.action == 'edited' && contains(github.event.pull_request.body, '/teardown')) ||
(
contains('unlabeled closed', github.event.action) &&
(
github.event.label.name == 'auto:deploy' ||
contains(github.event.pull_request.labels.*.name, 'auto:deploy')
)
)
)
The job is executed when the PR is labeled with 'auto:deploy' - which is unfortunate because its a destroy job that runs at the same time as the deploy job :D
How do I change the conditional to preserve truthiness when 'auto:deploy' is removed but not when it is added?