I found the article about triggering nightly builds however I’m unclear about how I can trigger workflows both on every commit AND on a schedule. My workflow is quite complex, do I need to duplicate the whole workflow jobs section of the yaml to achieve this?
Yes, you’re going to need to create two workflows with the same set of jobs defined. And apply the schedule trigger to one of the workflows. But using YAML anchors should make it easier. Consider the config below.
We defined the jobs in a YAML anchor called reusejobs, and we can reuse it in both jobs step of the workflows. You can see a working example here. There may be some instances where this won’t work, depending on how complex your workflow is. But it’s the only way i’m aware of at the moment. Otherwise you’ll need to simply duplicate the jobs for the scheduled and non scheduled workflow.