Skip to content

Commit 4c48c1c

Browse files
huxuanRenovate GitHub Bot
andauthored
chore: make renovate update template with postUpgradeTasks (#389)
Co-authored-by: Renovate GitHub Bot <[email protected]>
1 parent 26817a5 commit 4c48c1c

File tree

6 files changed

+70
-4
lines changed

6 files changed

+70
-4
lines changed

.github/workflows/renovate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
container:
55
env:
66
LOG_LEVEL: debug
7-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier"]'
7+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier", "^find"]'
88
RENOVATE_BRANCH_PREFIX: renovate-github/
99
RENOVATE_ENABLED: ${{ vars.RENOVATE_ENABLED || true }}
1010
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "gitlabci", "regex"]'

.gitlab/workflows/renovate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ renovate:
1111
variables:
1212
GIT_STRATEGY: none
1313
LOG_LEVEL: debug
14-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier"]'
14+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier", "^find"]'
1515
RENOVATE_BASE_DIR: $CI_PROJECT_DIR/renovate
1616
RENOVATE_BRANCH_PREFIX: renovate-gitlab/
1717
RENOVATE_ENABLED_MANAGERS: '["pep621", "gitlabci", "regex"]'

.renovaterc.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,39 @@
4646
"renovate/renovate"
4747
]
4848
},
49+
{
50+
"matchDepTypes": [
51+
"action"
52+
],
53+
"postUpgradeTasks": {
54+
"commands": [
55+
"find template -type f -exec sed -i 's|{{{depName}}}@{{{currentDigest}}} # {{{currentValue}}}|{{{depName}}}@{{{newDigest}}} # {{{newValue}}}|g' {} +"
56+
]
57+
}
58+
},
59+
{
60+
"matchDepTypes": [
61+
"github-runner"
62+
],
63+
"postUpgradeTasks": {
64+
"commands": [
65+
"find template -type f -exec sed -i 's|{{{depName}}}-{{{currentValue}}}|{{{depName}}}-{{{newValue}}}|g' {} +"
66+
]
67+
}
68+
},
69+
{
70+
"matchDepTypes": [
71+
"container",
72+
"docker",
73+
"image",
74+
"service-image"
75+
],
76+
"postUpgradeTasks": {
77+
"commands": [
78+
"find template -type f -exec sed -i 's|{{{depName}}}:{{{currentValue}}}@{{{currentDigest}}}|{{{depName}}}:{{{newValue}}}@{{{newDigest}}}|g' {} +"
79+
]
80+
}
81+
},
4982
{
5083
"commitMessageTopic": "serious-scaffold-python",
5184
"matchDepTypes": [

template/.renovaterc.json.jinja

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,39 @@
5252
"renovate/renovate"
5353
]
5454
},
55+
{
56+
"matchDepTypes": [
57+
"action"
58+
],
59+
"postUpgradeTasks": {
60+
"commands": [
61+
"find template -type f -exec sed -i {{ '\'s|{{{depName}}}@{{{currentDigest}}} # {{{currentValue}}}|{{{depName}}}@{{{newDigest}}} # {{{newValue}}}|g\' {} +' }}"
62+
]
63+
}
64+
},
65+
{
66+
"matchDepTypes": [
67+
"github-runner"
68+
],
69+
"postUpgradeTasks": {
70+
"commands": [
71+
"find template -type f -exec sed -i {{ '\'s|{{{depName}}}-{{{currentValue}}}|{{{depName}}}-{{{newValue}}}|g\' {} +' }}"
72+
]
73+
}
74+
},
75+
{
76+
"matchDepTypes": [
77+
"container",
78+
"docker",
79+
"image",
80+
"service-image"
81+
],
82+
"postUpgradeTasks": {
83+
"commands": [
84+
"find template -type f -exec sed -i {{ '\'s|{{{depName}}}:{{{currentValue}}}@{{{currentDigest}}}|{{{depName}}}:{{{newValue}}}@{{{newDigest}}}|g\' {} +' }}"
85+
]
86+
}
87+
},
5588
[%- endif %]
5689
{
5790
"commitMessageTopic": "serious-scaffold-python",

template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/renovate.yml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
container:
55
env:
66
LOG_LEVEL: debug
7-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier"]'
7+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier", "^find"]'
88
RENOVATE_BRANCH_PREFIX: renovate-github/
99
RENOVATE_ENABLED: {{ '${{ vars.RENOVATE_ENABLED || true }}' }}
1010
[%- if project_name == "Serious Scaffold Python" %]

template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/renovate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ renovate:
1111
variables:
1212
GIT_STRATEGY: none
1313
LOG_LEVEL: debug
14-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier"]'
14+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier", "^find"]'
1515
RENOVATE_BASE_DIR: $CI_PROJECT_DIR/renovate
1616
RENOVATE_BRANCH_PREFIX: renovate-gitlab/
1717
RENOVATE_ENABLED_MANAGERS: '["pep621", "gitlabci", "regex"]'

0 commit comments

Comments
 (0)