Skip to content

Commit

Permalink
Provide some generic regex managers
Browse files Browse the repository at this point in the history
which allow individual repositories to have custom managed dependencies,
currently only in workflow files. This might make sense for
pyproject.toml, which often contains custom dependencies as well.
  • Loading branch information
lkubb committed Oct 8, 2024
1 parent 75b6bd6 commit 399f372
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/renovate-global.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": [
"customManagers:githubActionsVersions"
],
"platform": "github",
"onboarding": false,
"requireConfig": "ignored",
Expand All @@ -17,6 +20,28 @@
"python": "3.10.15"
},
"schedule": ["before 4am"],
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^\\.github/workflows/[^/]+.ya?ml$"],
"matchStrings": [
"# renovate: datasource=(?<datasource>git.*-tags) depName=(?<depName>[^\\s]+?)(?: depType=(?<depType>[^\\s]+?))?(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+[A-Za-z0-9_/-]+?\\s*:\\s*[\"']?(?<currentDigest>[a-f0-9]+?)\\s+#\\s*(?<currentValue>v?[0-9.]+?)[\"']?\\s",
"# renovate: datasource=(?<datasource>docker) depName=(?<depName>[^\\s]+?)(?: depType=(?<depType>[^\\s]+?))?(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+[A-Za-z0-9_/-]+?\\s*:\\s*[\"']?([^:\\s]+:)?(?<currentValue>.+?)@(?<currentDigest>sha256:[a-f0-9]+?)[\"']?\\s",
"# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: depType=(?<depType>[^\\s]+?))?(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+[A-Za-z0-9_/-]+?\\s*:\\s*[\"']?(?<currentValue>v?[0-9.]+?)[\"']?\\s"
]
},
{
"customType": "regex",
"fileMatch": ["^\\.github/workflows/[^/]+.ya?ml$"],
"matchStrings": [
"# renovate:(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+uses:\\s*[\"']?(?<depName>[^\\s]+?)@(?<currentDigest>[a-f0-9]+?)\\s+#\\s*(?<currentValue>v?[0-9.]+?)[\"']?\\s",
"# renovate:(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+uses:\\s*[\"']?(?<depName>[^\\s]+?)@(?<currentValue>v?[0-9.]+?)[\"']?\\s"
],
"datasourceTemplate": "git-tags",
"depNameTemplate": "https://github.com/{{{depName}}}",
"depTypeTemplate": "action"
}
],
"packageRules": [
{
"matchManagers": ["copier"],
Expand All @@ -28,6 +53,13 @@
"/https:\\/\\/github.com\\/(salt-extensions|lkubb)\\/salt-extension-copier/"
],
"enabled": true
},
{
"matchManagers": ["regex"],
"matchFileNames": [".github/workflows/*.ya?ml"],
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"groupName": "Non-major CI dependency updates",
"automerge": true
}
],
"repositories": [
Expand Down
1 change: 0 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": [
"customManagers:githubActionsVersions",
"helpers:pinGitHubActionDigests",
],
"enabledManagers": [
Expand Down

0 comments on commit 399f372

Please sign in to comment.