Skip to content

Commit

Permalink
fix: template update with copier (#400)
Browse files Browse the repository at this point in the history
Signed-off-by: l.feng <[email protected]>
  • Loading branch information
msclock authored Dec 3, 2024
1 parent 2fd2672 commit 11e1bd6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 76 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Renovate

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/15 0-3 * * 1'
workflow_dispatch:

Expand All @@ -11,15 +10,15 @@ jobs:
container:
env:
LOG_LEVEL: debug
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier", "^find"]'
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^find"]'
RENOVATE_BRANCH_PREFIX: renovate-github/
RENOVATE_ENABLED: ${{ vars.RENOVATE_ENABLED || true }}
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "regex", "pre-commit"]'
RENOVATE_ENABLED_MANAGERS: '["pep621", "copier", "github-actions", "regex", "pre-commit"]'
RENOVATE_OPTIMIZE_FOR_DISABLED: 'true'
RENOVATE_PLATFORM: github
RENOVATE_REPOSITORIES: '["${{ github.repository }}"]'
RENOVATE_REPOSITORY_CACHE: enabled
image: ghcr.io/renovatebot/renovate:38.110.2@sha256:06665449c11c61011319ef8f1cd6e00a265d2692e84586f964ba368d4f67591d
image: ghcr.io/renovatebot/renovate:39.42.4@sha256:c5d718e312cdacc0746e37f13c215ff498be28c51e50efd24c070ae29f5b636a
options: --user root
runs-on: ubuntu-22.04
steps:
Expand Down
35 changes: 1 addition & 34 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
],
"automergeType": "pr",
"automergeStrategy": "merge-commit",
"ignoreScripts": false,
"platformAutomerge": true,
"packageRules": [
{
Expand Down Expand Up @@ -93,27 +94,6 @@
"renovate/renovate",
"renovatebot/pre-commit-hooks"
]
},
{
"commitMessageTopic": "serious-scaffold-cpp",
"matchDepTypes": [
"copier-template"
],
"postUpgradeTasks": {
"commands": [
"git stash",
"pip install copier==9.3.1",
"copier update --defaults --vcs-ref {{{newVersion}}}"
]
},
"semanticCommitScope": "copier-template"
},
{
"description": "Group apt packages to avoid failure when multiple packages are outdated.",
"groupName": "apt packages",
"matchDepTypes": [
"apt"
]
}
],
"customManagers": [
Expand Down Expand Up @@ -159,19 +139,6 @@
"matchStrings": [
"\"baseline\": \"(?<currentDigest>.*?)\"[^}]+?\"repository\": \"(?<depName>.*?)\""
]
},
{
"customType": "regex",
"datasourceTemplate": "git-tags",
"depNameTemplate": "https://github.com/serious-scaffold/ss-cpp.git",
"depTypeTemplate": "copier-template",
"fileMatch": [
"^\\.copier-answers\\.yml$"
],
"matchStrings": [
"_commit: (?<currentValue>.*?)\n"
],
"versioningTemplate": "semver"
}
]
}
35 changes: 1 addition & 34 deletions template/.renovaterc.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
],
"automergeType": "pr",
"automergeStrategy": "merge-commit",
"ignoreScripts": false,
"platformAutomerge": true,
"packageRules": [
[%- if repo_name == 'ss-cpp' %]
Expand Down Expand Up @@ -105,27 +106,6 @@
[%- endif %]
"renovatebot/pre-commit-hooks"
]
},
{
"commitMessageTopic": "serious-scaffold-cpp",
"matchDepTypes": [
"copier-template"
],
"postUpgradeTasks": {
"commands": [
"git stash",
"pip install copier==9.3.1",
"copier update --defaults --vcs-ref {{ '{{{newVersion}}}' }}"
]
},
"semanticCommitScope": "copier-template"
},
{
"description": "Group apt packages to avoid failure when multiple packages are outdated.",
"groupName": "apt packages",
"matchDepTypes": [
"apt"
]
}
],
"customManagers": [
Expand Down Expand Up @@ -173,19 +153,6 @@
"matchStrings": [
"\"baseline\": \"(?<currentDigest>.*?)\"[^}]+?\"repository\": \"(?<depName>.*?)\""
]
},
{
"customType": "regex",
"datasourceTemplate": "git-tags",
"depNameTemplate": "https://github.com/serious-scaffold/ss-cpp.git",
"depTypeTemplate": "copier-template",
"fileMatch": [
"^\\.copier-answers\\.yml$"
],
"matchStrings": [
"_commit: (?<currentValue>.*?)\n"
],
"versioningTemplate": "semver"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Renovate

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/15 0-3 * * 1'
workflow_dispatch:

Expand All @@ -11,15 +10,15 @@ jobs:
container:
env:
LOG_LEVEL: debug
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier", "^find"]'
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^find"]'
RENOVATE_BRANCH_PREFIX: renovate-github/
RENOVATE_ENABLED: {{ '${{ vars.RENOVATE_ENABLED || true }}' }}
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "regex", "pre-commit"]'
RENOVATE_ENABLED_MANAGERS: '["pep621", "copier", "github-actions", "regex", "pre-commit"]'
RENOVATE_OPTIMIZE_FOR_DISABLED: 'true'
RENOVATE_PLATFORM: github
RENOVATE_REPOSITORIES: '["{{ '${{ github.repository }}' }}"]'
RENOVATE_REPOSITORY_CACHE: enabled
image: ghcr.io/renovatebot/renovate:38.110.2@sha256:06665449c11c61011319ef8f1cd6e00a265d2692e84586f964ba368d4f67591d
image: ghcr.io/renovatebot/renovate:39.42.4@sha256:c5d718e312cdacc0746e37f13c215ff498be28c51e50efd24c070ae29f5b636a
options: --user root
runs-on: ubuntu-22.04
steps:
Expand Down

0 comments on commit 11e1bd6

Please sign in to comment.