Skip to content

Commit 4183bf1

Browse files
[EDI] Configuring multi-ecosystem updates for Dependabot (#60101)
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com>
1 parent e838e2f commit 4183bf1

File tree

8 files changed

+291
-409
lines changed

8 files changed

+291
-409
lines changed

content/code-security/concepts/supply-chain-security/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ children:
1919
- about-dependabot-security-updates
2020
- about-dependabot-version-updates
2121
- about-dependabot-pull-requests
22+
- multi-ecosystem-updates
2223
- about-the-dependabot-yml-file
2324
- about-dependabot-auto-triage-rules
2425
- about-dependabot-on-github-actions-runners
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
---
2+
title: Multi-ecosystem updates
3+
intro: Multi-ecosystem updates combine dependency updates across multiple package ecosystems into a single pull request, reducing review overhead and simplifying your update workflow.
4+
contentType: concepts
5+
versions:
6+
feature: dependabot-multi-ecosystem-support
7+
shortTitle: Multi-ecosystem updates
8+
---
9+
10+
## What are multi-ecosystem updates?
11+
12+
Multi-ecosystem updates allow {% data variables.product.prodname_dependabot %} to group dependency updates across different package ecosystems such as npm, Docker, Python, and Terraform into a single pull request per group.
13+
14+
Instead of receiving separate pull requests for each ecosystem, you receive one consolidated pull request containing all updates for the ecosystems in that group.
15+
16+
## How multi-ecosystem updates work
17+
18+
When you configure a multi-ecosystem group:
19+
20+
1. You define the group with a schedule in the `multi-ecosystem-groups` section of your `dependabot.yml` file.
21+
1. You assign individual package ecosystems to the group using the `multi-ecosystem-group` key.
22+
1. You specify which dependencies to include using the `patterns` key for each ecosystem.
23+
1. {% data variables.product.prodname_dependabot %} checks for updates according to the group's schedule.
24+
1. A single pull request is created containing updates from all ecosystems in the group.
25+
1. The PR uses the group identifier in both the branch name and title.
26+
27+
## When to use multi-ecosystem updates
28+
29+
Multi-ecosystem updates are particularly useful for:
30+
31+
* **Infrastructure projects** that use multiple technologies (Docker, Terraform, Python scripts)
32+
* **Full-stack applications** with frontend and backend dependencies that should be updated together
33+
* **Cross-platform libraries** that need synchronized protocol versions across languages
34+
* **Monorepos** with services in different languages that share versioning
35+
36+
## Multi-ecosystem versus single-ecosystem groups
37+
38+
{% data variables.product.prodname_dependabot %} supports two types of grouping:
39+
40+
**Multi-ecosystem groups:**
41+
* Span multiple `package-ecosystem` entries in your `dependabot.yml` file
42+
* Require the `patterns` key to specify which dependencies to include
43+
* Have their own schedule defined in the `multi-ecosystem-groups` section
44+
* Use the `multi-ecosystem-group` key to assign ecosystems to a group
45+
46+
**Single-ecosystem groups:**
47+
* Work within one package ecosystem
48+
* Use the `groups` key within an `updates` entry
49+
* Inherit the schedule from the parent `updates` entry
50+
* Better for organizing dependencies within a single package manager
51+
52+
Use multi-ecosystem groups when you want to combine updates across different package managers. Use single-ecosystem groups when you want to organize dependencies within a single package manager (for example, grouping all AWS-related npm packages together).
53+
54+
### Configuration merging behavior
55+
56+
Some configuration options can be set at both the group level and ecosystem level. {% data variables.product.prodname_dependabot %} combines these values differently depending on the option:
57+
58+
**Additive options** (values are merged):
59+
* `assignees` - All assignees from both levels are assigned to the pull request
60+
* `labels` - All labels from both levels are applied to the pull request
61+
62+
For example, if you assign `@platform-team` at the group level and `@docker-admin` at the Docker ecosystem level, the resulting pull request will be assigned to both `@platform-team` and `@docker-admin`.
63+
64+
**Group-only options** (can only be set at group level):
65+
* `milestone`
66+
* `commit-message`
67+
* `target-branch`
68+
* `pull-request-branch-name`
69+
70+
Attempting to set these options at the ecosystem level will cause a configuration error.
71+
72+
For a complete reference of all available configuration options and their behavior, see [AUTOTITLE](/code-security/reference/supply-chain-security/dependabot-options-reference#multi-ecosystem-groups).
73+
74+
## Use cases
75+
76+
### Infrastructure projects
77+
78+
Infrastructure code often uses multiple technologies—Docker containers, Terraform for cloud resources, and Python scripts for automation. Grouping these updates together simplifies review and deployment coordination.
79+
80+
**Why group these together:** Infrastructure changes often need to be deployed together. Having separate PRs for each technology creates coordination overhead and makes it harder to track what needs to be deployed as a unit.
81+
82+
**Example scenario:** You have Docker images for your services, Terraform modules for AWS resources, and Python scripts for automation tasks. A single weekly "infrastructure" pull request contains updates for all three, making it easier to review and deploy infrastructure changes together.
83+
84+
### Full-stack applications
85+
86+
Web applications with frontend and backend components benefit from updating dependencies together to ensure compatibility and streamline testing.
87+
88+
**Why group these together:** Frontend and backend often depend on each other. Updating them together ensures you can test the full application stack in one go, rather than merging frontend changes and then discovering backend incompatibilities later.
89+
90+
**Example scenario:** Your React frontend and Rails backend are updated daily in a single "app-dependencies" pull request, allowing you to test the complete application together before merging.
91+
92+
### Cross-platform libraries
93+
94+
Libraries or services that use the same protocols across different languages (like gRPC and Protocol Buffers) need to keep library versions synchronized across all implementations.
95+
96+
**Why group these together:** Protocol libraries need to stay compatible across different language implementations. Updating them together prevents version mismatches that could cause communication failures between services.
97+
98+
**Example scenario:** Your Node.js and Ruby services both use gRPC. A single pull request updates both `@grpc/grpc-js` (npm) and `grpc` (bundler) together, ensuring protocol compatibility.
99+
100+
### Monorepos with multiple services
101+
102+
Large repositories containing multiple services in different languages benefit from grouping updates by team responsibility or deployment cadence.
103+
104+
**Why group these together:** Different teams own different parts of the monorepo, and updates should be routed to the appropriate reviewers. Or services are deployed together and need coordinated updates.
105+
106+
**Example scenario:** Your monorepo has a Python API service, a Go worker service, and a Node.js frontend. You create separate groups for "backend-services" (Python + Go) and "frontend" (Node.js), each with different schedules and assignees.
107+
108+
## Example: Complex multi-group configuration
109+
110+
This example shows how a complex project might use multiple groups with different update strategies:
111+
112+
```yaml copy
113+
version: 2
114+
115+
multi-ecosystem-groups:
116+
# Infrastructure updates - weekly, tracked in milestone
117+
infrastructure:
118+
schedule:
119+
interval: "weekly"
120+
assignees: ["@platform-team"]
121+
labels: ["infrastructure", "dependencies"]
122+
milestone: 10
123+
124+
# Application code updates - daily, with development team
125+
full-stack:
126+
schedule:
127+
interval: "daily"
128+
assignees: ["@full-stack-team"]
129+
labels: ["full-stack"]
130+
131+
updates:
132+
# Docker images - infrastructure group with additional docker expertise
133+
- package-ecosystem: "docker"
134+
directory: "/"
135+
patterns: ["nginx", "redis", "postgres"]
136+
assignees: ["@docker-admin"] # Adds to @platform-team
137+
labels: ["docker"] # Adds to infrastructure, dependencies
138+
multi-ecosystem-group: "infrastructure"
139+
140+
# Terraform - infrastructure group
141+
- package-ecosystem: "terraform"
142+
directory: "/"
143+
patterns: ["aws", "terraform-*"]
144+
multi-ecosystem-group: "infrastructure"
145+
146+
# Frontend - full-stack group with frontend focus
147+
- package-ecosystem: "npm"
148+
directory: "/frontend"
149+
patterns: ["react", "lodash", "@types/*"]
150+
labels: ["frontend"] # Adds to full-stack
151+
multi-ecosystem-group: "full-stack"
152+
153+
# Backend - full-stack group with backend specialist
154+
- package-ecosystem: "bundler"
155+
directory: "/backend"
156+
patterns: ["rails", "pg", "sidekiq"]
157+
assignees: ["@backend-dev"] # Adds to @full-stack-team
158+
multi-ecosystem-group: "full-stack"
159+
```
160+
161+
## Next steps
162+
163+
* [AUTOTITLE](/code-security/how-tos/secure-your-supply-chain/secure-your-dependencies/configuring-multi-ecosystem-updates)
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: Configuring multi-ecosystem updates for Dependabot
3+
intro: Reduce the number of {% data variables.product.prodname_dependabot %} pull requests you receive by grouping updates across multiple ecosystems into a single, consolidated pull request.
4+
permissions: '{% data reusables.permissions.dependabot-yml-configure %}'
5+
allowTitleToDifferFromFilename: true
6+
contentType: how-tos
7+
versions:
8+
feature: dependabot-multi-ecosystem-support
9+
topics:
10+
- Dependabot
11+
- Version updates
12+
- Repositories
13+
- Dependencies
14+
- Pull requests
15+
shortTitle: Configure multi-ecosystem updates
16+
redirect_from:
17+
- /code-security/dependabot/working-with-dependabot/configuring-multi-ecosystem-updates
18+
- /code-security/tutorials/secure-your-dependencies/configuring-multi-ecosystem-updates
19+
---
20+
21+
Multi-ecosystem updates allow you to consolidate {% data variables.product.prodname_dependabot %} pull requests across different package ecosystems into a single PR per group. See [AUTOTITLE](/code-security/concepts/supply-chain-security/multi-ecosystem-updates).
22+
23+
## Prerequisites
24+
* A repository with dependencies in multiple package ecosystems
25+
* An existing `.github/dependabot.yml` file. See [AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates).
26+
27+
## 1. Define your multi-ecosystem group in your `.github/dependabot.yml` file
28+
29+
Start by defining a group with a schedule in the top-level `multi-ecosystem-groups` section:
30+
31+
```yaml copy
32+
version: 2
33+
34+
multi-ecosystem-groups:
35+
infrastructure:
36+
schedule:
37+
interval: "weekly"
38+
39+
updates:
40+
# Your existing package ecosystems will go here
41+
```
42+
43+
## 2. Assign ecosystems to the group
44+
45+
Add the `multi-ecosystem-groups` key and patterns to your package ecosystem configurations.
46+
47+
```yaml copy
48+
version: 2
49+
50+
multi-ecosystem-groups:
51+
infrastructure:
52+
schedule:
53+
interval: "weekly"
54+
55+
updates:
56+
- package-ecosystem: "docker"
57+
directory: "/"
58+
patterns: ["nginx", "redis", "postgres"]
59+
multi-ecosystem-group: "infrastructure"
60+
61+
- package-ecosystem: "terraform"
62+
directory: "/"
63+
patterns: ["aws", "terraform-*"]
64+
multi-ecosystem-group: "infrastructure"
65+
```
66+
67+
> [!NOTE]
68+
> Use `["*"]` to include all dependencies.
69+
70+
## 3. Commit your changes
71+
72+
Commit the changes to your `dependabot.yml` file.
73+
74+
## 4. Customize with additional keys (optional)
75+
76+
You can add labels, reviewers, or other configuration options to your multi-ecosystem groups. See [`assignees`](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#assignees--) and [`labels`](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#labels--).
77+
78+
```yaml copy
79+
multi-ecosystem-groups:
80+
infrastructure:
81+
schedule:
82+
interval: "weekly"
83+
assignees: ["@platform-team"]
84+
labels: ["infrastructure", "dependencies"]
85+
86+
updates:
87+
- package-ecosystem: "docker"
88+
directory: "/"
89+
patterns: ["nginx", "redis", "postgres"]
90+
multi-ecosystem-group: "infrastructure"
91+
92+
- package-ecosystem: "terraform"
93+
directory: "/"
94+
patterns: ["aws", "terraform-*"]
95+
multi-ecosystem-group: "infrastructure"
96+
```
97+
98+
For a complete list of available options, see [AUTOTITLE](/code-security/reference/supply-chain-security/dependabot-options-reference#multi-ecosystem-groups).
99+
100+
## 5. Verify your configuration
101+
102+
After committing your changes, you can verify the configuration:
103+
104+
1. Navigate to your repository's **Insights** tab.
105+
1. Select **Dependency graph**, then **{% data variables.product.prodname_dependabot %}**.
106+
1. Confirm your multi-ecosystem group appears in the list.
107+
108+
The next time the scheduled update runs, you'll receive a single pull request with updates from all ecosystems in the group.
109+
110+
## Troubleshooting
111+
112+
If you're not seeing consolidated pull requests, ensure that:
113+
* The `patterns` key is defined for each ecosystem (required when using `multi-ecosystem-group`).
114+
* All ecosystems use the same group name in the `multi-ecosystem-group` field.
115+
116+
## Further reading
117+
118+
* [AUTOTITLE](/code-security/dependabot/working-with-dependabot/dependabot-options-reference)

content/code-security/how-tos/secure-your-supply-chain/secure-your-dependencies/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ children:
1212
- /configuring-dependabot-security-updates
1313
- /configuring-dependabot-version-updates
1414
- /keeping-your-actions-up-to-date-with-dependabot
15+
- /configuring-multi-ecosystem-updates
1516
- /enabling-the-dependency-graph
1617
- /exploring-the-dependencies-of-a-repository
1718
- /configuring-automatic-dependency-submission-for-your-repository

content/code-security/reference/supply-chain-security/dependabot-options-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ Supported value: the numeric identifier of a milestone.
441441
>[!TIP]
442442
>If you view a milestone, the final part of the page URL, after `milestone`, is the identifier. For example: `https://github.com/<org>/<repo>/milestone/3`, see [AUTOTITLE](/issues/using-labels-and-milestones-to-track-work/viewing-your-milestones-progress).
443443

444-
{% ifversion not ghes %}
444+
{% ifversion dependabot-multi-ecosystem-support %}
445445

446446
## `multi-ecosystem-groups` {% octicon "versions" aria-label="Version updates" height="24" %}
447447

0 commit comments

Comments
 (0)