Update maven.yml with code from the github

This commit is contained in:
skyero-aws 2025-03-24 13:40:25 -07:00 committed by GitHub
parent c808d6df78
commit 3f60d85a9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: permissions:
branches: pull-requests: write
- "master" contents: write
pull_request:
branches:
- "master"
jobs: jobs:
build: dependabot:
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:
pull-requests: read
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}}