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 }}