-
Notifications
You must be signed in to change notification settings - Fork 0
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
9d921ef
commit 694d021
Showing
1 changed file
with
35 additions
and
18 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,21 +1,38 @@ | ||
name: automerge | ||
name: automatically merge dependabot PR's | ||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
jobs: | ||
run-unit-test: | ||
name: run unit test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
jobs: | ||
automerge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Automerge | ||
uses: "ahmadnassri/action-dependabot-auto-merge@v2" | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: run unit tests | ||
run: echo "unit test passed" | ||
|
||
auto-merge-dependabot: | ||
name: 🤖 Auto merge dependabot PR | ||
timeout-minutes: 10 | ||
needs: [ run-unit-test ] | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
steps: | ||
- name: 🤖 Merge PR from dependabot | ||
uses: ahmadnassri/action-dependabot-auto-merge@v2.6.6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
target: minor | ||
merge-method: rebase |