combine dependabotautomerge.yml with maven.yml for workflow completion check
This commit is contained in:
parent
e3b4c3af71
commit
29ffb48387
2 changed files with 23 additions and 4 deletions
3
.github/workflows/DependabotAutoMerge.yml
vendored
3
.github/workflows/DependabotAutoMerge.yml
vendored
|
|
@ -14,11 +14,8 @@ permissions:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_check:
|
|
||||||
uses: ./.github/workflows/maven.yml
|
|
||||||
dependabot:
|
dependabot:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build_check
|
|
||||||
if: github.event.pull_request.user.login == 'dependabot[bot]'
|
if: github.event.pull_request.user.login == 'dependabot[bot]'
|
||||||
steps:
|
steps:
|
||||||
- name: Dependabot metadata
|
- name: Dependabot metadata
|
||||||
|
|
|
||||||
22
.github/workflows/maven.yml
vendored
22
.github/workflows/maven.yml
vendored
|
|
@ -14,6 +14,11 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- "master"
|
- "master"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -37,3 +42,20 @@ jobs:
|
||||||
distribution: 'corretto'
|
distribution: 'corretto'
|
||||||
- name: Check backwards compatibility of changes
|
- 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}}
|
||||||
Loading…
Reference in a new issue