From 7b38af43bf2768e1d827edcf3f78ead96aa2f01a Mon Sep 17 00:00:00 2001 From: monosans Date: Sun, 29 Sep 2024 19:51:43 +0300 Subject: [PATCH] Configure renovate --- .github/dependabot.yml | 24 -------------- .github/renovate.json | 31 ++++++++++++++++++ .github/workflows/auto-merge.yml | 27 ---------------- .github/workflows/update-dependencies.yml | 39 ----------------------- renovate.json | 6 ---- 5 files changed, 31 insertions(+), 96 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/renovate.json delete mode 100644 .github/workflows/auto-merge.yml delete mode 100644 .github/workflows/update-dependencies.yml delete mode 100644 renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 6867168..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -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 diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..69514ff --- /dev/null +++ b/.github/renovate.json @@ -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"] +} diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml deleted file mode 100644 index 6f28a6e..0000000 --- a/.github/workflows/auto-merge.yml +++ /dev/null @@ -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 }} diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml deleted file mode 100644 index 79a73fc..0000000 --- a/.github/workflows/update-dependencies.yml +++ /dev/null @@ -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: diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 5db72dd..0000000 --- a/renovate.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended" - ] -}