Wait for Cirrus CI job to complete and then start a GH workflow #27037
-
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. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Using the github api, there is a way to trigger a workflow run. |
Beta Was this translation helpful? Give feedback.
-
I imagine you could use 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 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 |
Beta Was this translation helpful? Give feedback.
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