Skip to content

Commit 30a256e

Browse files
committed
activate dependabot auto-merge
1 parent e342932 commit 30a256e

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ updates:
88
- package-ecosystem: "maven"
99
directory: "/" # Location of package manifests
1010
schedule:
11-
interval: "weekly"
11+
interval: "daily"
12+
ignore:
13+
- dependency-name: "*"
14+
update-types: ["version-update:semver-major"]

.github/workflows/maven-build.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,38 @@ on:
1313
branches: [ "main" ]
1414
pull_request:
1515
branches: [ "main" ]
16-
workflow_dispatch:
16+
17+
permissions:
18+
contents: write
19+
pull-requests: write
1720

1821
jobs:
1922
build:
2023

2124
runs-on: ubuntu-latest
2225

2326
steps:
24-
- name: Setup Maven
25-
27+
- uses: actions/checkout@v3
28+
- name: Set up JDK 21
29+
uses: actions/setup-java@v3
2630
with:
27-
java-version: 21
28-
java-distribution: temurin
29-
31+
java-version: '21'
32+
distribution: 'temurin'
33+
cache: maven
3034
- name: Build with Maven
31-
run: mvn -B -V package
35+
run: mvn -B -V package
36+
37+
- name: Approve Dependabot PRs
38+
if: github.actor == 'dependabot[bot]'
39+
run: gh pr review --approve "$PR_URL"
40+
env:
41+
PR_URL: ${{github.event.pull_request.html_url}}
42+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
43+
44+
- name: Enable auto-merge for Dependabot PRs
45+
if: github.actor == 'dependabot[bot]'
46+
run: gh pr merge --auto --merge "$PR_URL"
47+
env:
48+
PR_URL: ${{github.event.pull_request.html_url}}
49+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
50+

0 commit comments

Comments
 (0)