'Can we wait for another repo workflow to complete before trigger the workflow in github actions?
I have three github repos test, core and actual. I want to trigger a workflow in actual repo when the test repo and core repo workflows are completed successfully. Both test and core repo workflows run parallelly. Is there any way to do this in github actions?
Thanks in advance.
Solution 1:[1]
I have had this issue and any existing published actions do not really satisfy the same situation you're in so I've made a couple of actions that facilitate this:
return-dispatch
This allows you to dispatch and get the run number needed to await completion.
await-remote-run
This awaits completion and provides a pass or fail etc.
Both have examples and documentation, hope this suits
Solution 2:[2]
That does not seem possible, for non-interdependent workflows, especially for different repositories.
A workaround would be to use the Wait On Check Action (repo GitHub), which allows for a job to wait, through Checks API, for another to complete.
As mentioned in issue 3, it only supports jobs from one repository, so you might need to fork that action, and apply this patch in order to support other repositories as well.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Codex |
| Solution 2 | VonC |
