-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (46 loc) · 1.5 KB
/
auto-merge.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# @todo: sync with other repositories
---
name: auto-merge
on:
# Try merging a pull request when it is approved.
pull_request_review: { types: submitted }
# Try merging a pull request when a draft is marked as “ready for review”
pull_request_target:
branches: [$default-branch]
types: [ready_for_review, labeled, unlabeled]
# Try merging pull requests belonging to a check suite.
check_suite:
types:
- completed
status: {}
# Try merging the specified pull request or all open pull requests if none is specified.
workflow_dispatch:
inputs:
pull-request:
description: pull request number
required: false
# Try merging all open pull requests.
schedule:
- cron: 0 4 * * 1
jobs:
automerge:
runs-on: ubuntu-latest
if: github.event.review.state == 'approved' || !github.event.review
steps:
- name: automerge
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: 'automerge,✅ Approved'
MERGE_RETRY_SLEEP: "60000"
MERGE_DELETE_BRANCH: "true"
MERGE_METHOD: squash
- name: automerge2
uses: reitermarkus/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
merge-method: merge
required-labels: 'automerge,✅ Approved'
do-not-merge-labels: ':warning: do-not-merge,:warning: wip'
pull-request: ${{ github.event.inputs.pull-request }}
dry-run: false