Can you prevent workflows from being run unless triggered via API?

Hi all,

We’ve got a monorepo with a my_repo workflow, and each job spins up, checks if it needs to run, and winds down if it doesn’t. I’d like to prevent the jobs from even needing to spin up at all.

Unfortunately the individual apps are built over several jobs, such as foo-frontend, foo-backend, foo-deployment and foo-smoke so firing off a single job isn’t enough to build/test/deploy foo. However, if I make a foo workflow, that workflow fires off every time the repository gets a new commit!

Is it possible to prevent workflows from being fired unless they’re requested via API?

Cheers guys.

1 Like

One thing you could do is to put it on a schedule, which by default does not also build on commits. You could then set up the schedule to be really long, so, for example, it builds once a month. Would that be OK in your use case?