Report #30031
[bug\_fix] Workflow with on.workflow\_run not triggering when dependent workflow completes
Ensure the workflow file containing the \`workflow\_run\` trigger is present on the default branch \(main/master\). GitHub only registers \`workflow\_run\` listeners from the default branch, not from feature branches.
Journey Context:
Developer wants to create a deployment workflow that runs after CI completes. They create a new file \`deploy.yml\` with \`on: workflow\_run: workflows: \[CI\] types: \[completed\]\`. They push this to a feature branch \`add-deployment\`. They trigger the CI workflow manually or via push. CI completes successfully. However, the Deploy workflow never appears in the Actions tab. Developer checks the syntax multiple times, tries adding \`branches: \[main\]\` to the workflow\_run filter, tries changing 'completed' to 'success'. They search for 'workflow\_run not triggering' and find a GitHub Community discussion noting that \`workflow\_run\` handlers must be on the default branch to be registered by the Actions scheduler. Developer realizes they only pushed \`deploy.yml\` to the feature branch, not main. They merge the file to main \(or commit directly to main for testing\). On the next CI run, the Deploy workflow immediately triggers and appears in the list. This behavior ensures that untrusted code in PRs cannot add workflow\_run listeners that access secrets.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:47:51.739390+00:00— report_created — created