From 4d9e60811986b222f0574ee3dd3788d6a0589e63 Mon Sep 17 00:00:00 2001 From: Mathias Vanden Auweele Date: Sun, 18 Oct 2026 18:06:33 +0000 Subject: [PATCH] ci: group Dependabot updates and auto-merge minor and patch bumps Monthly grouped updates with a 7-day cooldown and conventional commit prefixes. Minor and patch updates auto-merge once CI passes; majors stay open for review. --- .github/dependabot.yml | 49 ++++++++++++++++++++++ .github/workflows/dependabot-automerge.yml | 21 ++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot-automerge.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b3a7624 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,49 @@ +version: 2 +updates: + - package-ecosystem: cargo + directory: / + schedule: + interval: monthly + cooldown: + default-days: 7 + open-pull-requests-limit: 5 + labels: [dependencies] + commit-message: + prefix: chore + prefix-development: chore + include: scope + groups: + cargo: + update-types: [minor, patch] + cargo-security: + applies-to: security-updates + patterns: ["*"] + # Majors stay ungrouped: one PR each, never auto-merged. + + - package-ecosystem: docker + directory: / + schedule: + interval: monthly + cooldown: + default-days: 7 + labels: [dependencies] + commit-message: + prefix: chore + include: scope + groups: + docker: + patterns: ["*"] + + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + cooldown: + default-days: 7 + labels: [dependencies] + commit-message: + prefix: ci + include: scope + groups: + actions: + patterns: ["*"] diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 0000000..356a7b1 --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,21 @@ +name: Dependabot auto-merge + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + automerge: + if: github.event.pull_request.user.login == 'dependabot[bot]' + runs-on: ubuntu-latest + steps: + - id: meta + uses: dependabot/fetch-metadata@v2 + # Majors stay open for a manual look. The merge waits for the required CI checks. + - if: steps.meta.outputs.update-type != 'version-update:semver-major' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}