When condition inside orb job

Hi there

I’m trying to add some conditional steps to one of the jobs inside our reusable Orb.

Currently, I’ve got this in my steps: section:

  - run:
      name: Check param
      command: |
        echo "Branch = << parameters.branch >>"
        echo "Circle branch = ${CIRCLE_BRANCH}"
  - when:
      condition:
        matches:
          pattern: /^release.*$/
          value: << parameters.branch >>
      steps:
        - run:
            name: Got to RC condition
            command: |
              echo "I'm a release branch!!!"

I’ve tried various combinations of both the pattern and value, including using $CIRCLE_BRANCH env, using parameters.branch, making the branch param an env_var_name type.

However none of them seem to work…

The check param step correctly outputs the values I’d expect for both the param and the env var:

Branch = release/0.0.1
Circle branch = release/0.0.1

Any suggestions on how I can get this to work in an Orb?

Thanks
Gavin