Skip to content

Commit

Permalink
feat: add regexManagers
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelol authored Oct 5, 2023
1 parent b8bdb5a commit 9373c94
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# renovate-presets
Common Renovate presets

Custom [Renovate presets](https://docs.renovatebot.com/config-presets/), add to your renovate config:

```diff
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "extends": ["config:base"],
+ "extends": ["github>statnett/renovate-presets"],
}
```
25 changes: 25 additions & 0 deletions default.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"description": "",
"extends": [
"config:base",
"regexManagers:dockerfileVersions"
],
"regexManagers": [
{
"fileMatch": [".*"],
"matchStrings": [
"renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>\\S+?)(?: (packageName)=(?<packageName>\\S+?))?(?: versioning=(?<versioning>\\S+?))?(?: registryUrl=(?<registryUrl>\\S+?))?\\n\\s*(?:\\S+?_)?(?:VERSION|version|TAG|tag)\\s*[?]?[=:]\\s*\"?(?<currentValue>\\S+?)\"?\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
},
{
"fileMatch": [".*"],
"matchStrings": [
"# renovate-image:( versioning=(?<versioning>.*?))?\\n.*?(IMAGE|Image|image)\\s*[=:]\\s*\"?(?<depName>.+?):(?<currentValue>\\S+?)\"?(\\s|$)"
],
"datasourceTemplate": "docker",
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}docker{{/if}}"
},
],
}

0 comments on commit 9373c94

Please sign in to comment.