Skip to content
Discussion options

You must be logged in to vote

Hello @fummicc1,
I'm afraid the when.condition block does not currently support array iteration or built-in methods like Array.contains() or any() to check if any item in a list matches a condition. The expressions are quite limited and don’t support complex logic or scripting including using or or ||.
This condition check is best used when you are triggering based on only one variable in the response. A workaround I can think of here at the moment is making use of GitHub API in your script to fetch the Payload of the Pull request, and with that, you can use a script early in your workflow to fetch the PR labels and decide whether to continue the build or exit early. It’s a bit of a proce…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fummicc1
Comment options

Answer selected by fummicc1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants