diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 67267c9..1b48c08 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,11 +3,16 @@ updates: - package-ecosystem: cargo directory: "/" schedule: - interval: monthly - open-pull-requests-limit: 5 + interval: weekly + commit-message: + prefix: "chore" + include: "scope" - package-ecosystem: github-actions directory: "/" schedule: interval: daily ignore: - dependency-name: dtolnay/rust-toolchain + commit-message: + prefix: "ci" + include: "scope" diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 14fa033..624232b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -55,3 +55,18 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - run: cargo doc --no-deps + + # Automatically merge if it's a Dependabot PR that passes the build + dependabot: + needs: [test, fmt, clippy, docs] + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}}