-
Notifications
You must be signed in to change notification settings - Fork 10
34 lines (32 loc) · 1.11 KB
/
automerge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: automerge-CI
on:
issue_comment:
types: [created]
jobs:
# This job will merge an equipped PR in two steps:
# First it will add a merge label to the PR
# Then it will merge the PR based on the checks that is only if all checks are passed
merge:
if:
contains(github.event.comment.html_url, '/pull/') &&
startsWith(github.event.comment.body, '/merge')
runs-on: ubuntu-latest
steps:
- name: Add a merge label
uses: actions-ecosystem/action-add-labels@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
labels: merge
# The action will check if the required number of review approvals has been reached by verifying the default checks
- name: automerge
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: "merge,!WIP,!DO NOT MERGE"
MERGE_METHOD: "squash"
MERGE_FORKS: "true"
MERGE_RETRIES: "6"
MERGE_RETRY_SLEEP: "10000"
UPDATE_LABELS: ""
UPDATE_METHOD: "merge"
MERGE_DELETE_BRANCH: false