Replies: 4 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Yes — there are a few real-world cases where workflow_run simply never enqueues and therefore produces zero run records, exactly like what you're describing. Your debugging already eliminated the common mistakes, so this is probably one of the less-documented edge cases. The important distinction is: Job-level if: false → workflow run exists, jobs skipped You are clearly in the second category. Here are the most likely causes, ordered from most to least probable.
This part is poorly documented and causes silent failures. GitHub resolves the workflow names in: on: against workflows visible on the default branch when the triggering workflow completes. If any of these are true: workflow renamed recently then GitHub may silently fail to match the trigger. The especially nasty part: workflow_run matches the displayed workflow name attached to the completed run, not necessarily the current YAML contents. So historical runs can fail matching after renames.
You mentioned: ~55 more entries This is immediately suspicious. There are long-standing reports of workflow_run behaving inconsistently with very large workflow lists. GitHub has never clearly documented a hard limit, but people have observed failures somewhere around dozens of entries. The silent behavior: no enqueue This aligns very closely with your symptoms. Strong test Temporarily reduce to: on: Then manually fail Workflow A. If the listener suddenly works: you've confirmed a list-size/parser/matching issue. Honestly, based on your description, this is my leading hypothesis.
You already validated names, but there are still hidden traps: Examples These visually look identical: name: Workflow A vs name: "Workflow A " or Unicode normalization differences. GitHub stores workflow names internally after parsing. YAML normalization plus Unicode normalization can produce mismatches your meta-test won't catch unless you're comparing GitHub API-returned names. You should compare against: GET /repos/{owner}/{repo}/actions/workflows and validate against the API-returned name field, not raw YAML.
This is another undocumented-ish behavior. workflow_run can silently fail depending on how the original workflow was triggered. Particularly problematic: fork-originated runs You said scheduled workflows failed on master, which should work, so this is less likely.
If some of the named workflows are actually wrappers around reusable workflows, GitHub sometimes records names differently than expected. For example: visible UI name ≠ emitted workflow_run name Again: API inspection of actual completed runs matters more than YAML. This: workflows:
is completely valid. No issue there.
This sounds weird, but there are reports where GitHub optimizes away workflows before enqueue if all jobs are conditionally false-evaluable at planning time. Try adding: jobs: with no if:. If this suddenly produces runs: GitHub is incorrectly short-circuiting evaluation. I have personally seen Actions do surprising pre-evaluation behavior around event payloads.
GitHub aggressively prevents recursive workflow triggering. You already allow: workflow_run inside your predicate: contains([...], github.event.workflow_run.event) If some upstream workflows were themselves triggered by workflow_run, GitHub may suppress downstream chaining. GitHub officially documents some recursion prevention but not all of it. What I would test immediately Create: A jobs: on: jobs: If this works: the core feature works in your repo Then add complexity one piece at a time: add your if: You will likely find the breaking point. My actual suspicion ranking GitHub Actions has several event systems that behave differently: webhook delivery workflow_run is one of the least reliable and least observable parts of Actions. |
Beta Was this translation helpful? Give feedback.
-
|
I have systematically tried all of the above suggestions to no avail. I cannot get the workflow_run listener to fire. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
Workflow Configuration
Discussion Details
Summary
I have a
workflow_runlistener workflow that has been merged tomaster(the default branch) for over a week. The worfklow is intended to catch failed workflows across our repository and notify us via Slack. It has never produced a single run record → no active runs, no skipped runs, nothing. The GitHub Actions API confirmstotal_count: 0:GET /repos/{owner}/{repo}/actions/workflows/{listener-id}/runs # → {"total_count": 0, "workflow_runs": []} The [documentation](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_run) says a working workflow_run listener should produce a run record every time a subscribed workflow completes, even runs where the job is immediately skipped by the if: predicate. I am seeing none of that. --- Listener (minimal reproduction) name: "Notifications: Job failure" on: workflow_run: types: [completed] workflows: - "Workflow A" - "Workflow B" - "Workflow C" # ~55 more entries, each exactly matching another workflow file's # top-level `name:` value in the same repository permissions: contents: read jobs: notify: if: >- contains(fromJSON('["failure", "timed_out", "startup_failure", "action_required"]'), github.event.workflow_run.conclusion) && ( contains(fromJSON('["schedule", "workflow_dispatch", "workflow_run"]'), github.event.workflow_run.event) || (github.event.workflow_run.event == 'push' && github.event.workflow_run.head_branch == 'master') ) runs-on: ubuntu-latest timeout-minutes: 5 steps: - uses: actions/checkout@v4 with: persist-credentials: false - name: Notify env: WORKFLOW_NAME: ${{ github.event.workflow_run.name }} CONCLUSION: ${{ github.event.workflow_run.conclusion }} run: echo "Would notify: $WORKFLOW_NAME finished with $CONCLUSION"Note: the workflows: block uses YAML block sequence style (one entry per line with - prefix) rather than the inline flow style ([Workflow A, Workflow B, ...]) shown in most documentation examples. But that shouldn't matter for YAML parsing.
What I have confirmed
if:predicatePer the docs:
▎ "This event will only trigger a workflow run if the workflow file exists on the default branch."
That condition is met. The trigger is simply never firing.
What this is not
Related discussions
The above threads cover cases where the listener is enqueued but the job is skipped, or where event delivery is delayed. None cover the case where no run record is created at all for an active listener on the default branch.
Question
Has anyone encountered workflow_run silently failing to enqueue, producing no run record whatsoever, despite the listener being active on the default branch and multiple subscribed workflows completing? Is there a configuration condition (list size, YAML style, trigger ordering) that causes GitHub to not enqueue the listener rather than enqueue it and skip the job?
Beta Was this translation helpful? Give feedback.
All reactions