Question
As a DevOps engineer, you need to define a deployment workflow that runs after the build workflow has successfully completed. Without modifying the build workflow, which trigger should you define in the deployment workflow?
- A. repository_dispatch
- B. workflow_dispatch
- C. workflow_exec
- D. workflow_run Correct
Explanation
The workflow_run event lets a workflow run when another workflow is requested or completed. You can filter it on the build workflow's name and check its conclusion for success, all without changing the build workflow. repository_dispatch requires something to send an API call, which means changing the build workflow. workflow_dispatch is a manual trigger, and workflow_exec does not exist.