diff --git a/.github/workflows/validate-renovate-config.yml b/.github/workflows/validate-renovate-config.yml new file mode 100644 index 0000000..776c0e0 --- /dev/null +++ b/.github/workflows/validate-renovate-config.yml @@ -0,0 +1,21 @@ +name: validate-renovate-config + +on: + pull_request: + paths: [renovate.json5] + push: + branches: [main] + +env: + # renovate: datasource=node depName=node versioning=node + NODE_VERSION: "20" + +jobs: + validate-renovate-config: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + - run: npx -p renovate renovate-config-validator diff --git a/renovate.json5 b/renovate.json5 new file mode 100644 index 0000000..2f20971 --- /dev/null +++ b/renovate.json5 @@ -0,0 +1,40 @@ +{ + $schema: "https://docs.renovatebot.com/renovate-schema.json", + + extend: [ + // https://docs.renovatebot.com/presets-config/#configbase + "config:base", + + // https://docs.renovatebot.com/presets-default/#automergepatch + ":automergePatch", + + // https://docs.renovatebot.com/presets-default/#enableprecommit + ":enablePreCommit", + + // https://docs.renovatebot.com/presets-default/#prhourlylimitnone + ":prHourlyLimitNone", + + // https://docs.renovatebot.com/presets-default/#rebasestaleprs + ":rebaseStalePrs", + + // https://docs.renovatebot.com/presets-regexManagers/#regexmanagersgithubactionsversions + "regexManagers:githubActionsVersions", + ], + regexManagers: [ + { + fileMatch: ["^{{cookiecutter.project_name}}/pyproject\\.toml$"], + matchStrings: [ + '"(?pytest)": "\\^(?[^"]+)"', + '"(?pytest-cov)": "\\^(?[^"]+)"', + '"(?deptry)": "\\^(?[^"]+)"', + '"(?mypy)": "\\^(?[^"]+)"', + '"(?pre-commit)": "\\^(?[^"]+)"', + '"(?tox)": "\\^(?[^"]+)"', + '"(?mkdocs)": "\\^(?[^"]+)"', + '"(?mkdocs-material)": "\\^(?[^"]+)"', + '"(?mkdocstrings)": "\\{extras = \\[\\"python\\"\\], version = \\"\\^(?[^"]+)\\"\\}"', + ], + datasourceTemplate: "pypi", + }, + ], +}