Runner Groups Configuration
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 11 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Module: Manage GitHub Actions
Section: Manage Runners
Lesson Title: Runner Groups Configuration
Introduction: Why Runner Groups Matter
In the world of continuous integration and continuous deployment (CI/CD), GitHub Actions has become the standard for automating software workflows. While many teams start by using GitHub-hosted runners—the virtual machines managed by GitHub—the need for scale, security, and specialized hardware often drives organizations to adopt self-hosted runners. When you move to self-hosted infrastructure, you are no longer just managing a single machine; you are managing a fleet. This is where "Runner Groups" come into play.
Runner groups are a management construct within GitHub Enterprise and GitHub Organizations that allow you to organize your self-hosted runners into logical buckets. Without runner groups, every self-hosted runner you add would be available to every repository in your organization. This "flat" architecture is dangerous for security, inefficient for resource allocation, and impossible to manage at scale. By grouping runners, you gain the ability to apply access controls, set concurrency limits, and ensure that sensitive workloads only run on specific, hardened infrastructure.
Understanding runner groups is critical for any DevOps engineer or platform team lead. If you manage an organization with multiple teams, you cannot allow a junior developer's experiment in a sandbox repository to accidentally consume the entire compute budget of your production deployment runners. Runner groups provide the granular control necessary to treat your CI/CD infrastructure as a first-class citizen of your software development lifecycle.
Not read yet
The Fundamentals of Runner Groups
At its core, a runner group is a policy-based container for your self-hosted runners. When you create a runner group, you define two primary things: who can access the runners inside that group, and what those runners are allowed to do.
When you register a self-hosted runner, it is assigned to the "Default" group unless you specify otherwise. If you have a large organization, you will quickly find that the Default group becomes cluttered, making it difficult to manage security policies. By creating custom groups, you can segregate runners based on environment (e.g., Development, Staging, Production), hardware capability (e.g., GPU-enabled, high-memory), or compliance requirements (e.g., PCI-DSS compliant machines).
Key Capabilities of Runner Groups
- Access Control: You can restrict which repositories or organizations are allowed to trigger jobs on a specific runner group. This prevents unauthorized teams from using your private or expensive compute resources.
- Concurrency Limits: You can set a maximum number of concurrent jobs that a group can handle. This acts as a circuit breaker, preventing your CI system from overwhelming your underlying infrastructure during a spike in pull requests.
- Policy Enforcement: You can enforce requirements, such as requiring workflows to be from specific repository branches, which adds an extra layer of defense against malicious actors trying to execute code on your internal network.
- Organizational Hierarchy: Runner groups can be created at the enterprise level or the organization level, allowing for a delegated management model where central IT manages the infrastructure, but individual teams manage their own runner groups.
Callout: Runner Groups vs. Labels It is common to confuse runner groups with labels. Think of runner groups as the "Who" and "Where"—they define access and organizational boundaries. Think of labels as the "What"—they define the technical capabilities of the machine (e.g.,
ubuntu-latest,gpu-enabled,docker-capable). You use groups to restrict access, and you use labels to route specific jobs to specific machines within those groups.
Not read yet
Configuring Runner Groups: A Step-by-Step Guide
Configuring runner groups requires administrative access to the GitHub organization or enterprise account. If you do not have these permissions, you will need to coordinate with your organization's owner.
Step 1: Navigating to the Settings
- Log in to GitHub and navigate to your organization's main page.
- Click on the Settings tab located in the top navigation bar.
- In the left-hand sidebar, look for the Actions section and click on Runners.
- You will see a list of existing runners and a sub-tab labeled Runner groups. Click on this tab.
Step 2: Creating a New Group
- Click the New runner group button.
- Provide a descriptive name for the group. Use a naming convention that reflects the purpose of the group, such as
prod-high-performanceorteam-alpha-sandbox. - Choose the Access policy. You can choose to allow "All repositories" (not recommended for production) or "Selected repositories."
- If you chose "Selected repositories," use the search bar to add the specific repositories that should have access to this group.
- Click Create group.
Step 3: Assigning Runners to the Group
Once the group is created, you need to populate it. You can move existing runners into the group or assign new runners during the registration process.
- To move an existing runner, go to the Runners sub-tab.
- Click on the name of the runner you wish to move.
- In the runner details, look for the Runner group dropdown and select your newly created group.
- Click Save.
Note: Moving a runner to a new group will immediately change the access permissions for that runner. If the runner was previously accessible to all repositories, and you move it to a group that only allows access to one repository, any other workflows currently using that runner will fail immediately.
Not read yet
Advanced Configuration: Concurrency and Security Policies
Once your groups are set up, you should focus on tuning them for reliability. The most important setting here is the concurrency limit.
Managing Concurrency Limits
If you have a self-hosted runner group running on a set of virtual machines with limited CPU and RAM, you don't want 50 concurrent jobs trying to compile code at the same time. This would lead to resource contention, slow builds, and potentially crashing the runner service.
In the runner group configuration page, you will find an option for Runner group concurrency. By default, this is set to unlimited. You should change this to a value that matches the capacity of your infrastructure. If you have five machines in the group, and each machine can comfortably handle two jobs, set the limit to 10.
Enforcing Security Policies
GitHub allows you to restrict which workflows can run on a runner group based on the workflow's source. This is a vital security feature. You can toggle the setting: "Allow workflows from internal or private repositories only." This prevents public repositories from accidentally triggering jobs on your private infrastructure, which is a major security risk if your runners have access to internal databases or secrets.
Not read yet
Practical Examples and Use Cases
Let's look at a few real-world scenarios where runner groups are essential.
Scenario 1: The Multi-Team Organization
Imagine you have an organization with a "Frontend" team and a "Backend" team. The Frontend team needs specialized runners with Node.js and browser-testing capabilities, while the Backend team needs runners with high-memory machines for running integration tests against a database.
- Group A (Frontend): Contains 5 runners, restricted to the
frontend-apprepository. - Group B (Backend): Contains 5 runners, restricted to the
backend-apirepository. - The Result: The teams don't compete for resources. If the Frontend team starts a massive build that consumes all their runners, the Backend team's CI/CD pipeline remains unaffected.
Scenario 2: Production vs. Sandbox
You want to ensure that your production deployment pipeline is never blocked by a developer running a test workflow in a sandbox repository.
- Production Group: This group contains only the most stable, well-maintained runners. Access is restricted to the
productionandmainbranches of your primary application repository. - Sandbox Group: This group contains "disposable" runners. Any repository in the organization can use these. If these runners crash or get bogged down, it has zero impact on the production deployment process.
Not read yet
Comparison Table: GitHub-Hosted vs. Self-Hosted Runner Groups
| Feature | GitHub-Hosted Runners | Self-Hosted Runner Groups |
|---|---|---|
| Maintenance | None (Managed by GitHub) | High (Requires OS/Patch management) |
| Cost | Per-minute usage billing | Cost of underlying compute (AWS/GCP/On-prem) |
| Access Control | Global | Granular (Repository/Org level) |
| Environment | Clean image every time | Persistent (Can cache data/dependencies) |
| Network Access | Public (requires VPN/IP allowlisting) | Can run inside private VPC/Intranet |
Best Practices for Managing Runner Groups
Managing infrastructure at scale is as much about process as it is about technology. Follow these best practices to keep your runner fleet healthy.
1. Naming Conventions
Use a consistent naming scheme for your groups. A good format is [Env]-[Team]-[Capability]. For example, prod-data-gpu or dev-platform-general. This makes it immediately obvious what the group is for when you are looking at a list of fifty different groups.
2. Infrastructure as Code (IaC)
Do not create runner groups manually through the web UI for long-term production setups. Use the GitHub API or Terraform to define your runner groups. This ensures that your configuration is version-controlled, auditable, and reproducible. If a group is accidentally deleted, you can restore it in seconds using your Terraform state.
3. Monitoring and Alerting
Runner groups are a black box if you aren't monitoring them. Ensure you have logs streaming from your runners to a centralized logging system (like ELK, Datadog, or CloudWatch). Set up alerts for when the number of idle runners in a group drops to zero, or when the job queue depth for a specific group exceeds a certain threshold.
4. The "Default" Group Trap
Never put production runners in the "Default" runner group. The Default group is often the path of least resistance for new repositories. If you accidentally leave a repository with default settings, it might start pulling jobs from your production runners if they are sitting in the Default group. Always move production runners to a dedicated, restricted group.
5. Regular Lifecycle Management
Self-hosted runners can accumulate "cruft"—stale cache files, temporary build artifacts, and logs. Schedule regular replacements for the machines underlying your runner groups. Using ephemeral runners (runners that destroy themselves after a single job) is the gold standard for avoiding these issues.
Not read yet
Common Pitfalls and How to Avoid Them
Pitfall 1: The "Everything Access" Mistake
Many administrators create a group and, for the sake of simplicity, grant "All repositories" access. This is a security nightmare. If a malicious actor compromises a low-security repository, they can trigger a workflow that runs on your private, high-privilege runners.
- The Fix: Always default to "Selected repositories." Explicitly add the repositories that need access. It takes an extra minute to configure, but it prevents unauthorized access.
Pitfall 2: Over-provisioning
Companies often spin up 50 runners because they are cheap, only to find that their CI/CD jobs are waiting in line because of concurrency limits they set too low. Or, conversely, they set the limit to "unlimited" and end up with a massive AWS bill because they accidentally triggered 100 concurrent jobs.
- The Fix: Start with a conservative concurrency limit and monitor your job wait times. Adjust the limit upwards only when you have data showing that your average queue time is increasing.
Pitfall 3: Ignoring Runner Status
Sometimes, a runner service stops responding, but the runner still appears as "Online" in the GitHub UI. This happens if the process is hung.
- The Fix: Implement an external health check. A simple script that checks if the runner can successfully "ping" the GitHub API or execute a dummy job every few minutes can help you detect and restart dead runners automatically.
Not read yet
Troubleshooting Runner Groups
When things go wrong, the first place to look is the Actions tab in the repository that triggered the job. If the job is stuck in a "Queued" state, it almost always points to an issue with the runner group configuration.
Troubleshooting Checklist:
- Is the runner group accessible? Check if the repository triggering the job is actually included in the "Selected repositories" list for the group.
- Are the labels correct? Does the workflow file have a
runs-onlabel that matches the labels on the runners within the group? If your runners are labeledproductionbut your workflow asks forubuntu-latest, it will never pick up the job. - Is the concurrency limit reached? Go to the runner group settings page and check the current number of active jobs. If the limit is 5 and there are 5 jobs running, your new job will stay queued.
- Is the runner service running? SSH into the machine hosting the runner and check the status of the
actions.runnerservice. Usesystemctl status actions.runneron Linux to verify it is active and connected to GitHub.
Not read yet
Deep Dive: Ephemeral Runners and Groups
One of the most powerful features you can combine with runner groups is the "ephemeral" runner configuration. When you register a runner with the --ephemeral flag, the runner will automatically unregister itself from GitHub after it completes a single job.
When you use this in combination with runner groups, you ensure that every job gets a clean environment. This eliminates "poisoned" environments where a previous build left behind a configuration file or a modified environment variable that causes the next build to fail.
Example of registering an ephemeral runner in a specific group:
./config.sh --url https://github.com/my-org --token <TOKEN> \
--runnergroup my-production-group \
--name my-ephemeral-runner-01 \
--ephemeral
By using this approach, your runner group becomes a "pool" of capacity rather than a list of static machines. Your autoscaling group (in AWS or Azure) can scale the number of machines in the group up or down based on the number of jobs in the queue, and the runners will automatically join the group, perform one job, and leave.
Not read yet
Comparison of Access Policies
| Access Level | Description | Recommended Use Case |
|---|---|---|
| All Repositories | Any repo in the org can use these runners. | Public open-source projects, internal sandboxes. |
| Selected Repositories | Only specific repos can use these runners. | Production apps, sensitive security tools. |
| No Access | The group is effectively disabled. | Maintenance mode or decommissioning. |
Frequently Asked Questions (FAQ)
Q: Can a runner belong to multiple groups? A: No. A single runner instance can only be assigned to one runner group at a time. If you need a runner to satisfy multiple needs, you should use labels instead of groups.
Q: What happens if I delete a runner group? A: Any runners currently in that group will be moved to the "Default" runner group. You should be careful when deleting groups, as this effectively changes the permissions of those runners to match the Default group's policy.
Q: Can I use runner groups with GitHub Actions on GitHub Enterprise Server? A: Yes, runner groups are supported in both GitHub Enterprise Cloud and GitHub Enterprise Server. The configuration steps are identical.
Q: Is there a limit to how many runner groups I can have? A: GitHub does not impose a hard limit on the number of groups, but keep in mind that excessive fragmentation makes management difficult. Aim for a logical structure that reflects your team or project boundaries.
Not read yet
Key Takeaways
- Strategic Organization: Use runner groups to enforce security and resource boundaries. Never rely on the "Default" group for production or sensitive workloads.
- Access Control: Always prefer the "Selected repositories" access policy. It is the single most effective way to prevent unauthorized use of your compute resources.
- Governance through IaC: Treat your runner group configuration as code. Use tools like Terraform to define your groups to ensure consistency and disaster recovery capability.
- Capacity Management: Use concurrency limits to prevent your CI/CD pipelines from overwhelming your infrastructure. Monitor your queue times to determine when to scale up.
- Ephemeral Advantage: Combine runner groups with ephemeral runners to ensure clean, consistent environments for every build, reducing "it works on my machine" issues.
- Monitoring is Mandatory: A runner group is a piece of infrastructure. If you don't monitor the status and load of the runners within it, you are flying blind.
- Naming Matters: Implement a clear, hierarchical naming convention for your groups early on. As your organization grows, this will save you countless hours of administrative confusion.
Managing runner groups is a foundational skill for scaling GitHub Actions within an enterprise. By moving away from the default, flat structure and embracing a policy-driven, segmented approach, you transform your CI/CD infrastructure from a source of potential risk into a controlled, reliable asset for your development teams. Start by auditing your existing runners today, move them into appropriate groups, and apply the access policies that best align with your security posture.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Managed Users vs Personal Accounts
- Managed Users vs Personal Accounts Quiz5q
- Configuring SAML Single Sign-On
- Configuring SAML Single Sign-On Quiz5q
- Enforcing Two-Factor Authentication
- Enforcing Two-Factor Authentication Quiz5q
- SCIM Provisioning Implementation
- SCIM Provisioning Implementation Quiz5q
- Team Synchronization with IdP
- Team Synchronization with IdP Quiz5q
- Choosing Identity Providers
- Choosing Identity Providers Quiz5q
- Authentication and Authorization Model
- Authentication and Authorization Model Quiz5q
- Organization Roles Overview
- Organization Roles Overview Quiz5q
- Repository Roles Configuration
- Repository Roles Configuration Quiz5q
- Enterprise Teams Management
- Enterprise Teams Management Quiz5q
- Auditing Access and Permissions
- Auditing Access and Permissions Quiz5q
- Managing Policies and Rulesets
- Managing Policies and Rulesets Quiz5q
- Admin vs GitHub Support Responsibilities
- Admin vs GitHub Support Responsibilities Quiz5q
- Generating Support Bundles
- Generating Support Bundles Quiz5q
- Creating Diagnostics Reports
- Creating Diagnostics Reports Quiz5q
- Developer Process Standards
- Developer Process Standards Quiz5q
- Workflow and Branching Standards
- Workflow and Branching Standards Quiz5q
- GHEC with Enterprise Managed Users
- GHEC with Enterprise Managed Users Quiz5q
- GHEC with Data Residency
- GHEC with Data Residency Quiz5q
- GHEC with Personal Accounts
- GHEC with Personal Accounts Quiz5q
- GitHub Enterprise Server Deployment
- GitHub Enterprise Server Deployment Quiz5q
- Licensing and Billing Models
- Licensing and Billing Models Quiz5q
- Monitoring License Usage
- Monitoring License Usage Quiz5q
- Organization Security Policies
- Organization Security Policies Quiz5q
- Enterprise Security Policies
- Enterprise Security Policies Quiz5q
- Enterprise Security Posture
- Enterprise Security Posture Quiz5q
- Data Protection Strategies
- Data Protection Strategies Quiz5q
- Audit Logging Implementation
- Audit Logging Implementation Quiz5q
- Security Reporting and Compliance
- Security Reporting and Compliance Quiz5q
- Vulnerability Alerts Configuration
- Vulnerability Alerts Configuration Quiz5q
- Secret Scanning Setup
- Secret Scanning Setup Quiz5q
- CodeQL Code Scanning
- CodeQL Code Scanning Quiz5q
- Dependabot Configuration
- Dependabot Configuration Quiz5q
- Security Advisories Management
- Security Advisories Management Quiz5q
- Security Response Planning
- Security Response Planning Quiz5q
- Runner Groups Configuration
- Runner Groups Configuration Quiz5q
- GitHub-Hosted vs Self-Hosted
- GitHub-Hosted vs Self-Hosted Quiz5q
- IP Allow Lists Configuration
- IP Allow Lists Configuration Quiz5q
- Azure Private Networking
- Azure Private Networking Quiz5q
- Runner Performance Monitoring
- Runner Performance Monitoring Quiz5q
- Troubleshooting Runner Issues
- Troubleshooting Runner Issues Quiz5q
- Enterprise Migration Strategies
- Enterprise Migration Strategies Quiz5q
- Backup and Disaster Recovery
- Backup and Disaster Recovery Quiz5q
- High Availability Configuration
- High Availability Configuration Quiz5q
- Upgrade Planning and Execution
- Upgrade Planning and Execution Quiz5q
- Performance Tuning
- Performance Tuning Quiz5q
- Compliance and Regulatory Requirements
- Compliance and Regulatory Requirements Quiz5q
- Common Administration Issues
- Common Administration Issues Quiz5q
- Debugging Authentication Problems
- Debugging Authentication Problems Quiz5q
- Network Connectivity Issues
- Network Connectivity Issues Quiz5q
- Working with GitHub Support
- Working with GitHub Support Quiz5q
- Log Analysis and Debugging
- Log Analysis and Debugging Quiz5q
- Enterprise Maintenance Windows
- Enterprise Maintenance Windows Quiz5q
No GH-100 practice exam yet
Your points already work on 76 Amazon, CompTIA and Microsoft exams.
See the exams