-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
regex-managers.ts
44 lines (42 loc) · 1.63 KB
/
regex-managers.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import type { Preset } from '../types';
/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */
export const presets: Record<string, Preset> = {
dockerfileVersions: {
description: 'Update `_VERSION` variables in Dockerfiles.',
regexManagers: [
{
fileMatch: [
'(^|/|\\.)([Dd]ocker|[Cc]ontainer)file$',
'(^|/)([Dd]ocker|[Cc]ontainer)file[^/]*$',
],
matchStrings: [
'# renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>[^\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s(?:ENV|ARG) .+?_VERSION[ =]"?(?<currentValue>.+?)"?\\s',
],
},
],
},
githubActionsVersions: {
description:
'Update `_VERSION` environment variables in GitHub Action files.',
regexManagers: [
{
fileMatch: ['^.github/(?:workflows|actions)/.+\\.ya?ml$'],
matchStrings: [
'# renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[a-z-0-9]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*["\']?(?<currentValue>.+?)["\']?\\s',
],
},
],
},
helmChartYamlAppVersions: {
description: 'Update `appVersion` value in Helm chart `Chart.yaml`.',
regexManagers: [
{
datasourceTemplate: 'docker',
fileMatch: ['(^|/)Chart\\.yaml$'],
matchStrings: [
'#\\s*renovate: image=(?<depName>.*?)\\s+appVersion:\\s*["\']?(?<currentValue>[\\w+\\.\\-]*)',
],
},
],
},
};