A run-history entry shows a workflow that started with no new commit, no operator named as the actor, and no scheduled time, yet it appears immediately after a separate continuous integration workflow finished. The workflow file declares the on block below. Which trigger produced this run?
on:
workflow_run:
workflows: ["CI"]
types: [completed]- AThe schedule event, because a cron timetable happened to fire at the same moment the continuous integration workflow finished, producing a run with no commit and no operator.
- BThe push event, because completing the continuous integration workflow writes a status commit that this workflow then reacts to through its push trigger on the default branch.
- CThe workflow_run event, because this workflow is configured to start when the named CI workflow completes, so the run is attributed to that completion rather than to a commit or operator. Correct
- DThe repository_dispatch event, because the continuous integration workflow posted a custom payload to the REST API on completion, which this workflow consumed as an external dispatch.
Why A is wrong: Tempting because schedule also lacks a commit and operator, but no schedule key is declared and the timing is tied to a completed workflow, not a fixed cron time.
Why B is wrong: Tempting because workflows can chain, but completing CI does not create a commit, and no push key is declared, so a push trigger cannot have produced this run.
Why C is correct: The workflow_run trigger fires when the named workflow reaches the completed type, so the run is launched by the upstream workflow finishing rather than by any commit or human actor.
Why D is wrong: Tempting because both events lack a commit, but repository_dispatch needs an explicit external API call, and the declared trigger is workflow_run keyed to the CI workflow.