Skip to content

Commit 7893ef3

Browse files
authored
Merge pull request #332 from Homebrew/multi-ecosystem-groups
2 parents 2199a78 + b03ce44 commit 7893ef3

File tree

2 files changed

+23
-58
lines changed

2 files changed

+23
-58
lines changed

.github/actions/sync/dependabot.template.yml

Lines changed: 18 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
# organisation so intentionally contains a superset of all required attributes.
33
version: 2
44

5-
updates:
6-
- package-ecosystem: github-actions
7-
directory: /
5+
multi-ecosystem-groups:
6+
all:
87
schedule:
98
interval: weekly
109
day: "monday"
1110
time: "08:00"
1211
timezone: "Etc/UTC"
12+
13+
updates:
14+
- package-ecosystem: github-actions
15+
directory: /
16+
multi-ecosystem-group: "all"
17+
patterns: ["*"]
1318
allow:
1419
- dependency-type: all
15-
groups:
16-
dependabot:
17-
patterns:
18-
- "*"
1920
cooldown:
2021
default-days: 1
2122
include:
@@ -25,17 +26,10 @@ updates:
2526
directories:
2627
- /
2728
- /Library/Homebrew
28-
schedule:
29-
interval: weekly
30-
day: "monday"
31-
time: "08:00"
32-
timezone: "Etc/UTC"
29+
multi-ecosystem-group: "all"
30+
patterns: ["*"]
3331
allow:
3432
- dependency-type: all
35-
groups:
36-
dependabot:
37-
patterns:
38-
- "*"
3933
cooldown:
4034
default-days: 1
4135
semver-major-days: 14
@@ -46,17 +40,10 @@ updates:
4640

4741
- package-ecosystem: npm
4842
directory: /
49-
schedule:
50-
interval: weekly
51-
day: "monday"
52-
time: "08:00"
53-
timezone: "Etc/UTC"
43+
multi-ecosystem-group: "all"
44+
patterns: ["*"]
5445
allow:
5546
- dependency-type: all
56-
groups:
57-
dependabot:
58-
patterns:
59-
- "*"
6047
cooldown:
6148
default-days: 1
6249
semver-major-days: 14
@@ -67,31 +54,17 @@ updates:
6754

6855
- package-ecosystem: docker
6956
directory: /
70-
schedule:
71-
interval: weekly
72-
day: "monday"
73-
time: "08:00"
74-
timezone: "Etc/UTC"
57+
multi-ecosystem-group: "all"
58+
patterns: ["*"]
7559
allow:
7660
- dependency-type: all
77-
groups:
78-
dependabot:
79-
patterns:
80-
- "*"
8161

8262
- package-ecosystem: devcontainers
8363
directory: /
84-
schedule:
85-
interval: weekly
86-
day: "monday"
87-
time: "08:00"
88-
timezone: "Etc/UTC"
64+
multi-ecosystem-group: "all"
65+
patterns: ["*"]
8966
allow:
9067
- dependency-type: all
91-
groups:
92-
dependabot:
93-
patterns:
94-
- "*"
9568
cooldown:
9669
default-days: 1
9770
include:
@@ -101,17 +74,10 @@ updates:
10174
directories:
10275
- /
10376
- /Library/Homebrew/formula-analytics/
104-
schedule:
105-
interval: weekly
106-
day: "monday"
107-
time: "08:00"
108-
timezone: "Etc/UTC"
77+
multi-ecosystem-group: "all"
78+
patterns: ["*"]
10979
allow:
11080
- dependency-type: all
111-
groups:
112-
dependabot:
113-
patterns:
114-
- "*"
11581
cooldown:
11682
default-days: 1
11783
semver-major-days: 14

.github/actions/sync/shared-config.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ def git(*args)
6464

6565
target_gemfile_locks = []
6666
dependabot_config_yaml = YAML.load_file(dependabot_template_yaml)
67+
# This should be run after dependabot.yml for this repository (Monday)
68+
# and after the sync-shared-config job for synced repositories (Wednesday).
69+
# This maximises the chance of a single sync per week handling both any
70+
# changes and any dependabot updates.
71+
dependabot_config_yaml["multi-ecosystem-groups"]["all"]["schedule"]["day"] = "friday"
6772
dependabot_config_yaml["updates"] = dependabot_config_yaml["updates"].filter_map do |update|
6873
bundler_ecosystem = false
6974
ecosystem_file = case update["package-ecosystem"]
@@ -98,12 +103,6 @@ def git(*args)
98103
end
99104
next unless keep_update
100105

101-
# This should be run after dependabot.yml for this repository (Monday)
102-
# and after the sync-shared-config job for synced repositories (Wednesday).
103-
# This maximises the chance of a single sync per week handling both any
104-
# changes and any dependabot updates.
105-
update["schedule"]["day"] = "friday"
106-
107106
update
108107
end
109108
dependabot_config = dependabot_config_yaml.to_yaml

0 commit comments

Comments
 (0)