Wildcard branches in YAML Rule/if statement

I am trying to setup an if statement to only run on specific branches that are marked as release/* such as:

if: ‘$CI_COMMIT_BRANCH =~ /^release/’

Is there a way to establish a wildcard branch name for an rule/if statement? Feel like I have tried many combos and none seem to allow the rule to get pass/run. Thank you.

so I just had to remove the single quotes:

if: $CI_COMMIT_BRANCH =~ /^release/

1 Like