Condition opposite

Hello,

i wonder how to reverse this conditions:

    when:
      branch:
        - main
      event:
        - push

so i just want to do something when the complete opposite happens like NOT branch main AND NOT event push

is this possible?

Thank you

Have you tried exclude?

    when:
      branch:
        exclude:
          - main
      event:
        exclude:
          - push