Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmoten authored May 6, 2024
1 parent 300dd12 commit 6537d6e
Showing 1 changed file with 2 additions and 47 deletions.
49 changes: 2 additions & 47 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,7 @@
name: ci

## Does continuous integration build with Java 8 and 11 and
## if succeeds and due to a dependabot pull request (minor or
## patch verson change) it will automatically merge the PR.

## Unlike many sample automerge workflows this does not rely
## on third-party libraries apart from the official dependabot
## repository ones. This reduces the security risk significantly
## (we don't want to unknowingly merge malicious code or expose
## secrets to a malicious third party).
name: ci

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
- uses: codecov/codecov-action@v1
with:
file: ./**/target/site/jacoco/jacoco.xml
name: codecov
dependabot:
runs-on: ubuntu-latest
needs: build
permissions:
pull-requests: write
contents: write
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{!contains(steps.metadata.outputs.dependency-names, 'maven-plugin-api') && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch')}}
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
uses: davidmoten/workflows/.github/workflows/ci.yml@master

0 comments on commit 6537d6e

Please sign in to comment.