Configure renovate

This commit is contained in:
monosans
2024-09-29 19:52:02 +03:00
parent 8d60a57668
commit 807258968c
5 changed files with 31 additions and 96 deletions
-24
View File
@@ -1,24 +0,0 @@
version: 2
updates:
- package-ecosystem: docker
directory: /
schedule:
interval: daily
time: "00:00"
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
time: "00:00"
- package-ecosystem: pip
directory: /
schedule:
interval: daily
time: "00:00"
groups:
pip-semver-minor:
patterns:
- "*"
update-types:
- minor
- patch
+31
View File
@@ -0,0 +1,31 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"configMigration": true,
"dependencyDashboard": false,
"docker-compose": {
"enabled": true
},
"extends": ["config:recommended"],
"lockFileMaintenance": {
"enabled": true
},
"packageRules": [
{
"matchDepTypes": ["devDependencies"],
"automerge": true
},
{
"matchUpdateTypes": ["minor"],
"matchCurrentVersion": "!/^0/",
"automerge": true
},
{
"matchUpdateTypes": ["lockFileMaintenance", "patch", "pin"],
"automerge": true
}
],
"pre-commit": {
"enabled": true
},
"schedule": ["at any time"]
}
-27
View File
@@ -1,27 +0,0 @@
name: Auto-merge updates
on: pull_request
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
auto-merge-dependabot:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'monosans' && github.actor == 'dependabot[bot]' }}
steps:
- id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
- if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' && steps.dependabot-metadata.outputs.package-ecosystem != 'docker' }}
run: gh pr merge --auto --delete-branch --squash "${PR_URL}"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
auto-merge-updates:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'monosans' && github.actor_id == '158570872' }}
steps:
- run: gh pr merge --auto --delete-branch --squash "${PR_URL}"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-39
View File
@@ -1,39 +0,0 @@
name: Update dependencies
on:
workflow_dispatch:
schedule:
- cron: 00 01 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-dependencies:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'monosans' }}
strategy:
matrix:
include:
- cmd: pipx run poetry lock --no-interaction
commit-msg: Update poetry.lock
branch: update/poetry-lock
- cmd: pipx run pre-commit autoupdate
commit-msg: Update .pre-commit-config.yaml
branch: update/pre-commit-config
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: ${{ matrix.cmd }}
- id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: ${{ matrix.commit-msg }}
branch: ${{ matrix.branch }}
delete-branch: true
sign-commits: true
title: ${{ matrix.commit-msg }}
body:
-6
View File
@@ -1,6 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}