From c69d371d10b90b6ec1f492658751dccfbf3c99f4 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Tue, 4 Oct 2022 04:45:39 +0200 Subject: [PATCH] ci: replace dependabot with renovate (#4405) --- .dprint.json | 8 +-- .github/dependabot.yml | 23 -------- .github/renovate.json5 | 76 ++++++++++++++++++++++++++ .github/workflows/merge-dependabot.yml | 15 ----- 4 files changed, 80 insertions(+), 42 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/renovate.json5 delete mode 100644 .github/workflows/merge-dependabot.yml diff --git a/.dprint.json b/.dprint.json index bed83d4b..e35d4e25 100644 --- a/.dprint.json +++ b/.dprint.json @@ -39,9 +39,9 @@ "target/" ], "plugins": [ - "https://plugins.dprint.dev/typescript-0.68.2.wasm", - "https://plugins.dprint.dev/json-0.15.2.wasm", - "https://plugins.dprint.dev/markdown-0.13.2.wasm", - "https://plugins.dprint.dev/toml-0.5.4.wasm" + "https://github.com/dprint/dprint-plugin-typescript/releases/download/0.71.2/plugin.wasm", + "https://github.com/dprint/dprint-plugin-json/releases/download/0.15.5/plugin.wasm", + "https://github.com/dprint/dprint-plugin-markdown/releases/download/0.14.0/plugin.wasm", + "https://github.com/dprint/dprint-plugin-toml/releases/download/0.5.4/plugin.wasm" ] } diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index c0d36a0b..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2 -updates: -- package-ecosystem: cargo - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 - labels: - - "\U0001F4E6 dependencies" -- package-ecosystem: npm - directory: "/docs" - schedule: - interval: weekly - open-pull-requests-limit: 10 - labels: - - "\U0001F4E6 dependencies" -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 - labels: - - "\U0001F4E6 dependencies" diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 00000000..455c7429 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,76 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + // stripped-down config:base + ":prHourlyLimit2", + ":prConcurrentLimit10", + "group:monorepos", + "group:recommended", + "workarounds:all", + // automerge minor updates + ":automergeMinor", + ], + "labels": ["📦 dependencies"], + "semanticCommits": "enabled", + "semanticCommitType": "build", + "rangeStrategy": "bump", + "packageRules": [ + // group updates to related packages + { + "groupName": "clap crates", + "matchDatasources": ["crate"], + "matchPackagePrefixes": ["clap"] + }, + { + "groupName": "gitoxide crates", + "matchDatasources": ["crate"], + "matchPackagePrefixes": ["git"] + }, + { + "groupName": "pest crates", + "matchDatasources": ["crate"], + "matchPackagePrefixes": ["pest"] + }, + { + "groupName": "toml crates", + "matchDatasources": ["crate"], + "matchPackagePrefixes": ["toml"] + }, + { + "groupName": "unicode crates", + "matchDatasources": ["crate"], + "matchPackagePrefixes": ["unicode"] + }, + { + "groupName": "dprint plugins", + "matchPackagePrefixes": ["dprint"], + "extends": ["schedule:weekly"] + }, + { + "groupName": "npm", + "matchDatasources": ["npm"], + "extends": ["schedule:weekly"] + }, + // Update (rust) lockfiles weekly + { + "matchDatasources": ["crate"], + "lockFileMaintenance": { + "enabled": true, + "extends": ["schedule:weekly"] + } + } + ], + // custom regex update managers + "regexManagers": [ + { + "fileMatch": ["(^|\\/)\\.?dprint.json"], + "matchStrings": ["\"https://github.com/(?.+)/releases/download/(?.+)/plugin.wasm\""], + "datasourceTemplate": "github-releases" + }, + { + "fileMatch": ["^(workflow-templates|\\.github\\/workflows)\\/[^/]+\\.ya?ml$"], + "matchStrings": ["cargo install.*--version (?\\S+).*\\s(?\\S+)"], + "datasourceTemplate": "crate" + } + ] +} diff --git a/.github/workflows/merge-dependabot.yml b/.github/workflows/merge-dependabot.yml deleted file mode 100644 index f9c8f3ae..00000000 --- a/.github/workflows/merge-dependabot.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Auto-merge Dependabot PRs -on: - schedule: - - cron: "0 * * * *" -jobs: - auto_merge: - if: (github.event_name == 'schedule' && github.repository == 'starship/starship') || (github.event_name != 'schedule') - name: Auto-merge Dependabot PRs - runs-on: ubuntu-latest - steps: - - uses: akheron/dependabot-cron-action@d020867c009553e279f0200b621459444828a9b0 - with: - token: ${{ secrets.DEPENDABOT_GITHUB_API_TOKEN }} - auto-merge: "minor" - merge-method: "squash"