Combining cron and push triggers doesn't work?

Hi,

I’ve tried combining a cron and push trigger with a master branch condition. Reading the docs it says ‘all triggers have to eval to true’ for the job to run, which may be impossible if it’s a cron combined with anything else?

I tried:

trigger:
  branch:
  - master
  event:
  - cron
  - push
  cron:
  - nightly

trigger:
  branch:
  - master
  event:
  - cron
  - push
  trigger:
    include:
    - nightly

trigger:
  branch:
  - master
  event:
    include:
    - cron
    - push
  trigger:
    include:
    - nightly

no joy for either combo. Is this meant to work / am I doing something wrong?

Cheers

correct, this would not be possible since all triggers must evaluate to true. There may be other ways to model your yaml, however, I would have to see a complete example and would need a more detailed description of what you are trying to accomplish to advise further.

Cheers, that’s ok - I just wanted to make sure it’s not me structuring it incorrectly. I’ll do a yaml anchor and repeat the block for a different trigger I reckon.