Skip to content

Commit 78767fe

Browse files
authored
Pin GitHub Actions to full vX.Y.Z tags in Renovate (#23570)
* Pin GitHub Actions to full vX.Y.Z tags in Renovate * Limit Renovate to action depType only Renovate's github-actions manager also extracts runner versions (runs-on), action input versions (uses-with, e.g. node-version), and container/service images. Scope the action-only rule to matchDepTypes:[action] and explicitly disable every other depType so runner/input/container bumps stay manual. * Allow Renovate to bump uses-with inputs in same group
1 parent 64e3557 commit 78767fe

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

renovate.json

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,39 @@
1919
],
2020
"packageRules": [
2121
{
22+
"description": "Only consider full vX.Y.Z tags upstream so we never pin to a moving major-only tag (e.g. v3, v9). pinact's --check rewrites the trailing comment to the canonical full-semver tag of the SHA, so a v3 comment from Renovate would always fail validation.",
2223
"matchManagers": [
2324
"github-actions"
2425
],
26+
"matchDepTypes": [
27+
"action"
28+
],
2529
"matchFileNames": [
2630
".github/workflows/**",
2731
".github/actions/tag-job/**"
2832
],
2933
"matchPackageNames": [
3034
"!dtolnay/rust-toolchain"
3135
],
36+
"extractVersion": "^(?<version>v\\d+\\.\\d+\\.\\d+)$",
37+
"groupName": "actions",
38+
"schedule": [
39+
"before 6am on Monday"
40+
],
41+
"labels": [
42+
"renovate/actions",
43+
"qa/skip-qa"
44+
],
45+
"minimumReleaseAge": "7 days"
46+
},
47+
{
48+
"description": "Allow updates to action input versions (uses-with, e.g. node-version / python-version) without the strict full-semver matcher applied to action tags.",
49+
"matchManagers": [
50+
"github-actions"
51+
],
52+
"matchDepTypes": [
53+
"uses-with"
54+
],
3255
"groupName": "actions",
3356
"schedule": [
3457
"before 6am on Monday"
@@ -40,11 +63,15 @@
4063
"minimumReleaseAge": "7 days"
4164
},
4265
{
66+
"description": "Runner versions (runs-on) and container/service/docker images are bumped manually when needed.",
4367
"matchManagers": [
4468
"github-actions"
4569
],
46-
"matchDepNames": [
47-
"python"
70+
"matchDepTypes": [
71+
"github-runner",
72+
"docker",
73+
"container",
74+
"service"
4875
],
4976
"enabled": false
5077
},

0 commit comments

Comments
 (0)