Run workflow only if other Github Checks passed

Is there a way to trigger execution of a workflow only after other Github Checks have passed?

We’re trying to keep our free open source minutes in check, and being able to defer CircleCI tests until basic linting has passed would save a few minutes for each commit made to PRs.

There is no way to do this AFAIK, but just to note there is no cap on minutes for FOSS projects. If you see a message in the UI about approaching limits, it’s just a UI bug right now.

If you see a message in the UI about approaching limits, it’s just a UI bug right now.

That’s good to know! We had been a little worried about that. Still, with over 500 org members and over 800 contributors, we frequently clog the queues with many hours worth of tests. So the interest in not needlessly running them remains.

Do you think it would be feasible to have our bot handle the launch of workflows? Basically, we could have our app listen to the checks events, and once the linters have passed, trigger the workflow via the new API call I believe I saw.

1 Like

Yes it’s feasible but it means that you would need to disable webhooks from GitHub, so no builds would run automatically. It’s definitely a trade off but might make sense for you.

Hmm. I had thought to use and avoid normal builds by adding - ignore /.*/ to the jobs. Re-reading the docs, it appears that the ignore would apply to API triggered workflows as well.

Reading the docs again - I’m really not quite clear on the three trigger APIs - there is .../{:project}/, .../{:project}/tree/{:branch} and .../{:project}/build, triggering “a job”, “a build with branch” and “a build by project” respectively. The docs on the first of these three (“Trigger a job”) begin with “Triggers a build…”.

We are working on clearing this up, I understand the confusion. is the one you want to use if you are looking to trigger a Workflow.

Any filters you have set for ignore will be handled that same as if this was triggered via a webhook.