Update maven.yml with code from the github
This commit is contained in:
parent
c808d6df78
commit
3f60d85a9e
1 changed files with 7 additions and 38 deletions
45
.github/workflows/maven.yml
vendored
45
.github/workflows/maven.yml
vendored
|
|
@ -6,52 +6,21 @@
|
||||||
# separate terms of service, privacy policy, and support
|
# separate terms of service, privacy policy, and support
|
||||||
# documentation.
|
# documentation.
|
||||||
|
|
||||||
name: Java CI with Maven
|
name: Dependabot auto-merge
|
||||||
on:
|
on: pull_request
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "master"
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- "master"
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up JDK 8
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
java-version: '8'
|
|
||||||
distribution: 'corretto'
|
|
||||||
- name: Build with Maven
|
|
||||||
run: mvn -B package --file pom.xml -DskipITs
|
|
||||||
backwards-compatible-check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up JDK 8
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
java-version: '8'
|
|
||||||
distribution: 'corretto'
|
|
||||||
- name: Check backwards compatibility of changes
|
|
||||||
run: .github/scripts/backwards_compatibility_check.sh
|
|
||||||
auto-merge-vulnerable-PRs:
|
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: read
|
pull-requests: write
|
||||||
|
contents: write
|
||||||
|
jobs:
|
||||||
|
dependabot:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'owner/my_repo'
|
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'owner/my_repo'
|
||||||
steps:
|
steps:
|
||||||
- name: Dependabot metadata
|
- name: Dependabot metadata
|
||||||
id: dependabot-metadata
|
id: dependabot-metadata
|
||||||
uses: dependabot/fetch-metadata@v2
|
uses: dependabot/fetch-metadata@v2
|
||||||
with:
|
|
||||||
alert-lookup: true
|
|
||||||
github-token: "${{ secrets.PAT_TOKEN }}"
|
|
||||||
- name: Enable auto-merge for Dependabot PRs
|
- name: Enable auto-merge for Dependabot PRs
|
||||||
# if: (steps.dependabot-metadata.outputs.cvss == true && update_types == 'minor' || 'patch')
|
if: ${{contains(steps.dependabot-metadata.outputs.dependency-names, 'rails') && steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch'}}
|
||||||
if: steps.dependabot-metadata.outputs.cvss == true
|
|
||||||
run: gh pr merge --auto --merge "$PR_URL"
|
run: gh pr merge --auto --merge "$PR_URL"
|
||||||
env:
|
env:
|
||||||
PR_URL: ${{github.event.pull_request.html_url}}
|
PR_URL: ${{github.event.pull_request.html_url}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue