-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
300dd12
commit 6537d6e
Showing
1 changed file
with
2 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |