Skip to content

Commit 3b75c5c

Browse files
committed
ci: add Dependabot auto-merge and group lockstep deps
Auto-merges patch and minor Dependabot PRs once required CI checks pass. Groups AWS SDK v2, Jackson, and Mockito (all version-pinned together via ${version.*} properties) plus actions/attest-* so SBOM and provenance action bumps land in a single PR. Avoids `update-types: ["minor", "patch"]` inside groups (dependabot-core #14202 silently suppresses major-version PRs for matched deps).
1 parent 1d07c40 commit 3b75c5c

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,26 @@ updates:
55
schedule:
66
interval: "daily"
77
open-pull-requests-limit: 20
8+
groups:
9+
aws-sdk:
10+
patterns:
11+
- "software.amazon.awssdk:*"
12+
jackson:
13+
patterns:
14+
- "com.fasterxml.jackson.core:*"
15+
- "com.fasterxml.jackson.dataformat:*"
16+
- "com.fasterxml.jackson.datatype:*"
17+
- "com.fasterxml.jackson.module:*"
18+
mockito:
19+
patterns:
20+
- "org.mockito:*"
21+
822
- package-ecosystem: "github-actions"
923
directory: "/"
1024
schedule:
1125
interval: "daily"
1226
open-pull-requests-limit: 20
27+
groups:
28+
actions-attest:
29+
patterns:
30+
- "actions/attest-*"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Dependabot auto-merge
2+
3+
on:
4+
pull_request_target:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
auto-merge:
12+
if: github.event.pull_request.user.login == 'dependabot[bot]'
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
steps:
18+
- name: Fetch Dependabot metadata
19+
id: meta
20+
uses: dependabot/fetch-metadata@v2
21+
22+
- name: Enable auto-merge for patch and minor updates
23+
if: |
24+
steps.meta.outputs.update-type == 'version-update:semver-patch' ||
25+
steps.meta.outputs.update-type == 'version-update:semver-minor'
26+
run: gh pr merge --auto --squash "$PR_URL"
27+
env:
28+
PR_URL: ${{ github.event.pull_request.html_url }}
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)