-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (43 loc) · 1.33 KB
/
check_dependabot_pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Check dependabot PR
on: pull_request_target
permissions:
pull-requests: write
contents: write
actions: read
checks: write
jobs:
check_pull_request:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: maven
- name: Install dependencies
run: ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- name: Run tests and collect coverage
run: ./mvnw -B test
- name: Test Report
uses: dorny/[email protected]
if: success() || failure()
with:
name: JavaAI Tests
path: 'target/surefire-reports/TEST-*.xml'
reporter: java-junit
approve_dependabot_pull_request:
runs-on: ubuntu-latest
needs: [ check_pull_request ]
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}