Skip to content

Commit d68d79f

Browse files
committed
Instruct Renovate to pin GitHub Actions based on SHA
1 parent 01f3ef4 commit d68d79f

File tree

1 file changed

+97
-25
lines changed

1 file changed

+97
-25
lines changed

.github/renovate.json5

Lines changed: 97 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,39 @@
11
{
22
$schema: "https://docs.renovatebot.com/renovate-schema.json",
33
dependencyDashboard: true,
4-
suppressNotifications: ["prEditedNotification"],
5-
extends: ["config:recommended"],
6-
labels: ["internal"],
7-
schedule: ["before 4am on Monday"],
4+
suppressNotifications: [
5+
"prEditedNotification"
6+
],
7+
extends: [
8+
"config:recommended"
9+
],
10+
labels: [
11+
"internal"
12+
],
13+
schedule: [
14+
"before 4am on Monday"
15+
],
816
semanticCommits: "disabled",
917
separateMajorMinor: false,
1018
prHourlyLimit: 10,
11-
enabledManagers: ["github-actions", "pre-commit", "cargo", "pep621", "pip_requirements", "npm"],
19+
enabledManagers: [
20+
"github-actions",
21+
"pre-commit",
22+
"cargo",
23+
"pep621",
24+
"pip_requirements",
25+
"npm"
26+
],
1227
cargo: {
1328
// See https://docs.renovatebot.com/configuration-options/#rangestrategy
1429
rangeStrategy: "update-lockfile",
1530
},
1631
pep621: {
1732
// The default for this package manager is to only search for `pyproject.toml` files
1833
// found at the repository root: https://docs.renovatebot.com/modules/manager/pep621/#file-matching
19-
fileMatch: ["^(python|scripts)/.*pyproject\\.toml$"],
34+
fileMatch: [
35+
"^(python|scripts)/.*pyproject\\.toml$"
36+
],
2037
},
2138
pip_requirements: {
2239
// The default for this package manager is to run on all requirements.txt files:
@@ -29,76 +46,131 @@
2946
// - https://docs.renovatebot.com/modules/manager/#ignoring-files-that-match-the-default-filematch
3047
// - https://docs.renovatebot.com/configuration-options/#ignorepaths
3148
// - https://docs.renovatebot.com/string-pattern-matching/#negative-matching
32-
ignorePaths: ["!docs/requirements*.txt"]
49+
ignorePaths: [
50+
"!docs/requirements*.txt"
51+
]
3352
},
3453
npm: {
3554
// The default for this package manager is to only search for `package.json` files
3655
// found at the repository root: https://docs.renovatebot.com/modules/manager/npm/#file-matching
37-
fileMatch: ["^playground/.*package\\.json$"],
56+
fileMatch: [
57+
"^playground/.*package\\.json$"
58+
],
3859
},
3960
"pre-commit": {
4061
enabled: true,
4162
},
4263
packageRules: [
64+
// Pin GitHub Actions to immutable SHAs.
65+
{
66+
matchDepTypes: [
67+
"action"
68+
],
69+
pinDigests: true,
70+
},
71+
// Annotate GitHub Actions SHAs with a SemVer version.
72+
{
73+
extends: [
74+
"helpers:pinGitHubActionDigests"
75+
],
76+
extractVersion: "^(?<version>v?\\d+\\.\\d+\\.\\d+)$",
77+
versioning: "regex:^v?(?<major>\\d+)(\\.(?<minor>\\d+)\\.(?<patch>\\d+))?$",
78+
},
4379
{
4480
// Group upload/download artifact updates, the versions are dependent
4581
groupName: "Artifact GitHub Actions dependencies",
46-
matchManagers: ["github-actions"],
47-
matchDatasources: ["gitea-tags", "github-tags"],
48-
matchPackageNames: ["actions/.*-artifact"],
82+
matchManagers: [
83+
"github-actions"
84+
],
85+
matchDatasources: [
86+
"gitea-tags",
87+
"github-tags"
88+
],
89+
matchPackageNames: [
90+
"actions/.*-artifact"
91+
],
4992
description: "Weekly update of artifact-related GitHub Actions dependencies",
5093
},
5194
{
5295
// This package rule disables updates for GitHub runners:
5396
// we'd only pin them to a specific version
5497
// if there was a deliberate reason to do so
5598
groupName: "GitHub runners",
56-
matchManagers: ["github-actions"],
57-
matchDatasources: ["github-runners"],
99+
matchManagers: [
100+
"github-actions"
101+
],
102+
matchDatasources: [
103+
"github-runners"
104+
],
58105
description: "Disable PRs updating GitHub runners (e.g. 'runs-on: macos-14')",
59106
enabled: false,
60107
},
61108
{
62109
// Disable updates of `zip-rs`; intentionally pinned for now due to ownership change
63110
// See: https://github.com/astral-sh/uv/issues/3642
64-
matchPackageNames: ["zip"],
65-
matchManagers: ["cargo"],
111+
matchPackageNames: [
112+
"zip"
113+
],
114+
matchManagers: [
115+
"cargo"
116+
],
66117
enabled: false,
67118
},
68119
{
69120
// `mkdocs-material` requires a manual update to keep the version in sync
70121
// with `mkdocs-material-insider`.
71122
// See: https://squidfunk.github.io/mkdocs-material/insiders/upgrade/
72-
matchManagers: ["pip_requirements"],
73-
matchPackageNames: ["mkdocs-material"],
123+
matchManagers: [
124+
"pip_requirements"
125+
],
126+
matchPackageNames: [
127+
"mkdocs-material"
128+
],
74129
enabled: false,
75130
},
76131
{
77132
groupName: "pre-commit dependencies",
78-
matchManagers: ["pre-commit"],
133+
matchManagers: [
134+
"pre-commit"
135+
],
79136
description: "Weekly update of pre-commit dependencies",
80137
},
81138
{
82139
groupName: "NPM Development dependencies",
83-
matchManagers: ["npm"],
84-
matchDepTypes: ["devDependencies"],
140+
matchManagers: [
141+
"npm"
142+
],
143+
matchDepTypes: [
144+
"devDependencies"
145+
],
85146
description: "Weekly update of NPM development dependencies",
86147
},
87148
{
88149
groupName: "Monaco",
89-
matchManagers: ["npm"],
90-
matchPackageNames: ["monaco"],
150+
matchManagers: [
151+
"npm"
152+
],
153+
matchPackageNames: [
154+
"monaco"
155+
],
91156
description: "Weekly update of the Monaco editor",
92157
},
93158
{
94159
groupName: "strum",
95-
matchManagers: ["cargo"],
96-
matchPackageNames: ["strum"],
160+
matchManagers: [
161+
"cargo"
162+
],
163+
matchPackageNames: [
164+
"strum"
165+
],
97166
description: "Weekly update of strum dependencies",
98167
}
99168
],
100169
vulnerabilityAlerts: {
101170
commitMessageSuffix: "",
102-
labels: ["internal", "security"],
171+
labels: [
172+
"internal",
173+
"security"
174+
],
103175
},
104176
}

0 commit comments

Comments
 (0)