Wait for Cirrus CI job to complete and then start a GH workflow

I have tests that run on Cirrus CI, and then a workflow that builds my app inside GitHub repo.

I wanted to know if there is a way to wait till all the Cirrus CI and other workflows are completed. Then run the deployment workflow in github.

Using the github api, there is a way to trigger a workflow run.

1 Like

I imagine you could use repository_dispatch:

https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch

So once your tests are done on CircleCI, you can send a repository_dispatch to GitHub.

You also mentioned “wait till all the Cirrus CI and other workflows”. If those other workflows are GitHub Action workflows, you can also use workflow_run:

This event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow. A workflow run is triggered regardless of the result of the previous workflow.

https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run

1 Like