Enforce required CI workflows across an organization using GitHub rulesets

domain: docs.github.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Navigate to Organization Settings > Rules > Rulesets and create a new ruleset targeting the repositories and branches where CI must be enforced
  2. Add the 'Require workflows to pass before merging' rule and specify the workflow to require by entering the source repository, file path, and ref (e.g., ORG/.github-workflows/.github/workflows/ci.yml@main)
  3. Set the ruleset enforcement status to Evaluate to audit compliance without blocking merges during rollout, then switch to Active once the required workflow runs reliably across all targeted repos
  4. The required workflow must include pull_request and/or merge_group in its on: trigger; rulesets only enforce workflows on PR and merge queue events, not push or schedule events
  5. Grant bypass permissions (bypass list) to specific roles or teams that need to merge without waiting for CI in emergencies; bypass actors are audited in the organization's audit log
  6. Organization rulesets became available on GitHub Team plans in June 2025; on Enterprise Cloud, rulesets can also be defined at the enterprise level to cascade across all organizations

Known gotchas

Related routes

Structure GitHub Actions reusable workflows (workflow_call) for cross-repository sharing
docs.github.com · 6 steps · unrated
Configure GitHub branch protection rules and repository rulesets via API
docs.github.com · 5 steps · unrated
Implement a GitLab CI pipeline with dynamic child pipelines generated from changed paths using rules and the artifact strategy
docs.gitlab.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans