Skip to content

Commit

Permalink
ci: use starflow renovate config (#260)
Browse files Browse the repository at this point in the history
* ci: use starflow renovate config

* ci: print renovate config in renovate job

* ci: iterate

* fix: better renovate dry-run
  • Loading branch information
lengau authored Dec 12, 2024
1 parent b3a71bf commit 512434d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 220 deletions.
219 changes: 1 addition & 218 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,220 +1,3 @@
{
extends: [
'config:recommended',
':semanticCommitTypeAll(build)',
':enablePreCommit',
],
labels: [
'dependencies',
],
baseBranches: [
'$default',
'/^hotfix\\/.*/',
],
pip_requirements: {
fileMatch: [
'^tox.ini$',
'(^|/)requirements([\\w-]*)\\.txt$',
],
},
packageRules: [
{
groupName: 'internal package minor releases',
matchUpdateTypes: [
'minor',
'patch',
'pin',
'digest',
],
prPriority: 10,
automerge: true,
minimumReleaseAge: '0 seconds',
schedule: [
'at any time',
],
matchBaseBranches: [
'$default',
],
matchPackageNames: [
'/^craft-.*/',
],
},
{
groupName: 'internal package patch releases (hotfix)',
matchUpdateTypes: [
'patch',
'pin',
'digest',
],
prPriority: 10,
minimumReleaseAge: '0 seconds',
schedule: [
'at any time',
],
matchBaseBranches: [
'/^hotfix\\/.*/',
],
matchPackageNames: [
'/^craft-.*/',
],
},
{
groupName: 'bugfixes',
matchUpdateTypes: [
'patch',
'pin',
'digest',
],
prPriority: 3,
automerge: true,
matchDepNames: [
'!/lint/.*/',
'!/types/.*/',
'!/pyright/',
],
},
{
groupName: 'internal packages',
matchCategories: [
'python',
],
prPriority: 2,
matchBaseBranches: [
'$default',
],
matchDepNames: [
'/craft-.*/',
'/snap-.*/',
],
},
{
groupName: 'GitHub Actions',
matchManagers: [
'github-actions',
],
prPriority: 1,
automerge: true,
},
{
groupName: 'pydantic etc.',
matchBaseBranches: [
'$default',
],
matchPackageNames: [
'/^pydantic/',
],
},
{
groupName: 'development dependencies (non-major)',
groupSlug: 'dev-dependencies',
matchUpdateTypes: [
'minor',
'patch',
'pin',
'digest',
],
prPriority: -1,
automerge: true,
matchBaseBranches: [
'$default',
],
matchDepNames: [
'/dev/.*/',
'/lint/.*/',
'/types/.*/',
],
matchPackageNames: [
'/^(.*/)?autoflake$/',
'/^(.*/)?black$/',
'/^(.*/)?codespell$/',
'/^(.*/)?coverage$/',
'/^(.*/)?flake8$/',
'/^(.*/)?hypothesis$/',
'/^(.*/)?mypy$/',
'/^(.*/)?pycodestyle$/',
'/^(.*/)?docstyle$/',
'/^(.*/)?pyfakefs$/',
'/^(.*/)?pyflakes$/',
'/^(.*/)?pylint$/',
'/^(.*/)?pytest/',
'/^(.*/)?responses$/',
'/^(.*/)?ruff$/',
'/^(.*/)?twine$/',
'/^(.*/)?tox$/',
'/^(.*/)?types-/',
],
},
{
groupName: 'documentation dependencies',
groupSlug: 'doc-dependencies',
matchPackageNames: [
'Sphinx',
'furo',
'/[Ss]phinx.*$/',
],
matchBaseBranches: [
'$default',
],
matchDepNames: [
'/docs/.*/',
],
},
{
matchUpdateTypes: [
'major',
],
prPriority: -2,
matchBaseBranches: [
'$default',
],
},
{
groupName: 'development dependencies (major versions)',
groupSlug: 'dev-dependencies',
matchDepTypes: [
'devDependencies',
],
matchUpdateTypes: [
'major',
],
prPriority: -3,
matchBaseBranches: [
'$default',
],
},
{
matchPackageNames: [
'pyright',
'types/pyright',
],
prPriority: -4,
matchBaseBranches: [
'$default',
],
},
],
customManagers: [
{
fileMatch: [
'tox.ini',
],
customType: 'regex',
depTypeTemplate: 'devDependencies',
matchStrings: [
'# renovate: datasource=(?<datasource>\\S+)\n\\s+(?<depName>.*?)(\\[[\\w]*\\])*[=><]=?(?<currentValue>.*?)\n',
],
},
],
timezone: 'Etc/UTC',
schedule: [
'every weekend',
],
prConcurrentLimit: 2,
branchConcurrentLimit: 20,
prCreation: 'not-pending',
prNotPendingHours: 4,
prHourlyLimit: 1,
minimumReleaseAge: '2 days',
automergeStrategy: 'squash',
semanticCommitType: 'build',
extends: ["github>canonical/starflow:renovate-base.json5"],
}
4 changes: 2 additions & 2 deletions .github/workflows/check-renovate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
node-version: 22
- name: Install renovate
run: npm install --global renovate
run: npm install --global re2 renovate
- name: Enable ssh access
uses: mxschmitt/action-tmate@v3
if: ${{ inputs.enable_ssh_access }}
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Check renovate config
run: renovate-config-validator .github/renovate.json5
- name: Renovate dry-run
run: renovate --dry-run --autodiscover
run: renovate --dry-run=full --autodiscover --print-config
env:
RENOVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RENOVATE_USE_BASE_BRANCH_CONFIG: ${{ github.ref }}

0 comments on commit 512434d

Please sign in to comment.