combine dependabotautomerge.yml with maven.yml for workflow completion check

This commit is contained in:
skye rogers 2025-03-28 15:40:09 -07:00
parent e3b4c3af71
commit 29ffb48387
2 changed files with 23 additions and 4 deletions

View file

@ -14,11 +14,8 @@ permissions:
pull-requests: write
jobs:
build_check:
uses: ./.github/workflows/maven.yml
dependabot:
runs-on: ubuntu-latest
needs: build_check
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Dependabot metadata

View file

@ -14,6 +14,11 @@ on:
pull_request:
branches:
- "master"
permissions:
contents: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
@ -36,4 +41,21 @@ jobs:
java-version: '8'
distribution: 'corretto'
- name: Check backwards compatibility of changes
run: .github/scripts/backwards_compatibility_check.sh
run: .github/scripts/backwards_compatibility_check.sh
dependabot:
needs: [build]
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
alert-lookup: true
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type != 'version-update:semver-major' && steps.metadata.outputs.cvss > 0
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}