Search icon
ForEach icon
RunWorkflow icon
SlackIncomingWebhook icon
Schedule icon

Cross-Repo GitHub Actions Workflow Dispatch

Search GitHub by query and fan one GitHub Actions workflow out across every matching repository with Kestra, with bounded concurrency and a Slack rollout summary.

Categories
Infrastructure

Roll a single GitHub Actions workflow out across a whole fleet of repositories in one run. This blueprint searches GitHub for the repositories that match a query (for example an organization plus a shared topic), loops over every match, dispatches the same workflow_dispatch workflow in each one, and posts a rollout summary to Slack. It solves the multi-repo automation problem: when you maintain dozens of repositories that share a CI workflow, security scan, or dependency-update job, you no longer have to click through each one or script the GitHub API by hand. You declare the search, the workflow, and the branch, and Kestra handles the fan-out, the parallelism, and the reporting.

How it works

  1. find_repositories (io.kestra.plugin.github.repositories.Search) runs your search_query against the GitHub Search API with fetchType: FETCH, returning every matching repository as rows.
  2. dispatch_each (io.kestra.plugin.core.flow.ForEach) iterates over outputs.find_repositories.rows with a concurrencyLimit of 4, so repositories are dispatched a few at a time rather than all at once.
  3. Inside the loop, dispatch (io.kestra.plugin.github.actions.RunWorkflow) calls the GitHub Actions REST dispatch endpoint for each taskrun.value.full_name, triggering workflow_id on the chosen ref.
  4. notify (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) sends a message reporting how many repositories were dispatched, using outputs.find_repositories.size.
  5. The optional weekly_rollout schedule trigger (io.kestra.plugin.core.trigger.Schedule, cron 0 9 * * 1) can run the rollout every Monday morning. It ships disabled so you opt in deliberately.

What you get

  • One declarative rollout instead of N manual dispatches.
  • Query-driven targeting: add a topic to a repo and it joins the fleet automatically.
  • Bounded parallelism via concurrencyLimit to stay within API rate limits.
  • A Slack summary every time the rollout runs.

Who it's for

  • Platform and DevEx engineers maintaining shared CI/CD across many repositories.
  • SREs pushing security scans or patch workflows org-wide.
  • Open-source maintainers coordinating releases across a project family.

Why orchestrate this with Kestra

GitHub Actions can schedule a workflow inside one repository, but it cannot natively search for a set of repositories and fan a dispatch out across all of them with bounded concurrency, retries, and a single audit trail. Kestra adds event and schedule triggers, automatic retries on transient API failures, full execution lineage across every dispatched repo, and a declarative YAML definition you can version and review. The whole rollout becomes one observable execution instead of a pile of ad hoc API calls.

Prerequisites

Secrets

  • GITHUB_TOKEN: a token allowed to search repositories and dispatch GitHub Actions workflows in the target repositories.
  • SLACK_WEBHOOK_URL: a Slack incoming webhook URL for the rollout summary.

A workflow_dispatch-enabled workflow must be present on the chosen ref in every matching repository.

Quick start

  1. Set GITHUB_TOKEN and SLACK_WEBHOOK_URL as secrets in your Kestra namespace.
  2. Tag the repositories you manage with a shared topic, then reference it in search_query (for example org:my-org topic:kestra-managed).
  3. Run the flow with the workflow_id and ref you want to roll out.

How to extend

  • Swap the Slack notification for an email, Microsoft Teams, or PagerDuty alert.
  • Add a follow-up task that polls each dispatched run for status and aggregates results.
  • Replace the topic search with a query by language, owner, or last-updated date.
  • Enable weekly_rollout or add an event trigger to dispatch on a webhook.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.