How can I update a 3rd party when all the required checks for a PR pass, or one of them fails? #179376
-
Why are you starting this discussion?Question What GitHub Actions topic or product is this about?Workflow Configuration Discussion DetailsI've got a ruleset set up for the default branch with "Require status checks to pass" checked, and some (but not all) of the checks that fire I wish to find the PR (if any) associated with the commit against which that check ran when either:
and notify a 3rd party about the state of the required checks on that PR, in a GitHub Actions workflow. I started by simply trying to dump everything I could for every event I could think of: name: Dump Event
on:
check_run:
types:
- created
- completed
- rerequested
- requested_action
check_suite:
types:
- completed
- requested
- rerequested
status:
permissions: read-all
jobs:
dump-event:
runs-on: ubuntu-24.04
steps:
- run: cat "$GITHUB_EVENT_PATH" | jq .This workflow exists on both the default branch and the PR branch, as do the workflows representing required checks. Yet this Dump Event workflow is never triggered when those required check workflows start, fail or succeed. There has to be a way to do this, right? It would be insane if there were no way to do this. Edit: I've had a look at |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
This discussion was started because the user is trying to achieve something GitHub Actions doesn’t directly support out of the box — monitoring status checks on the default branch (or PR) and automatically notifying an external system when all required checks pass or fail — without hardcoding workflow names. In other words, they want a generic, self-updating mechanism that listens for the completion of required checks (like CI jobs) and then triggers another workflow to report the outcome to a third party. However, when they tried to use the obvious events (check_run, check_suite, or status), none of them triggered as expected — even though the workflows they’re observing are running. So they started this discussion because they hit a limitation in GitHub Actions’ event model and want to know: “Is there any way to dynamically detect and respond to all check results for a commit or pull request, without manually listing every workflow name?” 🔍 The Technical Context They have a ruleset requiring status checks on the default branch. They want automation that reacts when those checks pass or fail. They tried: check_run events → didn’t fire for workflows in the same repo. check_suite events → same issue. status events → not triggered for Actions-based checks. They considered workflow_run, but it requires explicitly listing workflow names, which isn’t scalable or maintainable. ⚙️ Why This Happens GitHub Actions workflows don’t emit check_run or status events for themselves — those events are only emitted for external CI integrations (like CircleCI, Jenkins, or GitHub Apps), not for internal GitHub Actions workflows. This is why the “Dump Event” workflow never fired: GitHub doesn’t treat internal workflow jobs as standalone “check runs” that trigger these events externally. Instead, workflow_run is the only supported event that can detect when other workflows complete. Unfortunately, it’s workflow-name–specific by design — you must list which workflows to monitor. 🚧 The Core Problem There’s no generic built-in event that fires “whenever any required check completes” in a maintainable way within GitHub Actions. That’s why the discussion exists — the user (and many others) are highlighting this missing capability and seeking a reliable workaround or official feature to: Detect the completion of any required check (not just named workflows). Automatically associate the commit or PR. Notify an external system with the aggregated result. 🧭 In Summary This discussion was started because: The user wants to automate status reporting for required checks on PRs. They found that check_run, check_suite, and status events don’t trigger for GitHub Actions workflows. They need a scalable solution that doesn’t require manually maintaining a list of workflow names in workflow_run. They’re essentially pointing out a gap in GitHub Actions’ design — there’s currently no universal event hook for “required checks passed or failed” across all workflows in a repository. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Yeah, that makes sense,,, I ran into the same limitation when I tried to hook into check_run and status events. They just don’t fire for Actions-based checks within the same repo, which feels counterintuitive. Using workflow_run is definitely the most reliable approach right now. What I ended up doing was setting up a single “monitor” workflow that listens for workflow_run on all the CI workflows I care about, then uses the GitHub API to: Fetch the associated commit SHA from the completed workflow. Look up any open PR that includes that commit. Check whether all the required checks for that PR are passing or failing. Send a notification to the external system depending on the result. It’s not as clean as having a generic “required checks completed” event, but it’s a solid workaround until GitHub introduces something native for this. Would definitely love to see this use case officially supported though ,, it’s surprising there’s no scalable, built-in event for tracking required check results across all workflows. |
Beta Was this translation helpful? Give feedback.
yeah true that’s the limitation with workflow_run right now a better workaround is to add a tiny notifier step at the end of each required check that triggers a repo_dispatch or webhook that way you don’t need to list workflows manually and it scales across all repos easily