Using multiple conditions with when/unless

Reaching out as I’m having difficulity to getting mutliple conditions to work in a when condition.
I would like to execute a workflow/job/step using the when/unless setup but with taking in multiple conditions. In below example, I would like to run android-navigation if both foo as bar are true. Atm both android-navigation as androd-maps execute, while only android-maps should.

Any help or pointers would be greatly appreciated!

version: 2.1

parameters:
  foo:
    type: boolean
    default: true
  bar:
    type: boolean
    default: false

workflows:
  version: 2
  android-navigation:
    when: << pipeline.parameters.foo >> && << pipeline.parameters.bar >>
    jobs:
      - codecoverage
      - binary-size
  android-maps:
    when: << pipeline.parameters.foo >>
    jobs:
      - codecoverage
      - binary-size

The when step can only take a single condition, but you can nest them for a similar outcome. You can see an example here.

edit: I’m now realizing this is for the workflow condition when… sorry this may not apply

Hi @tobrun,

We recently implemented advanced config-compile-time logic; this will allow you to specify multiple conditions.

It is documented here.