I want to run a dependent workflow only when the previous workflow is trigger by a release event #49742
-
Select Topic AreaQuestion BodyI have a job that builds an image when a release is published or when manually triggered. When it completes, a deploy job runs. I only want the deploy job to run, when the build job is triggered by a release. The workflow_run documentation shows that the branch can be specified. How can I specify the deploy workflow to run only when the build workflow was triggered by a release event? I do not want to create a duplicate build job that only has the Step 1 Step 2 Note: A solution is included at the end of the thread that combines both workflows into one. I have not discovered a way to make this work with two separate workflows. If you do, please add that solution to this thread as that was the original question. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
|
you could use types name: deploy
on:
workflow_run:
workflows: [build]
types:
- completed |
Beta Was this translation helpful? Give feedback.
you could use types
documentation