-
-
Notifications
You must be signed in to change notification settings - Fork 6
67 lines (61 loc) · 1.71 KB
/
auto-merge.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Auto Merge PR
on:
pull_request:
types: [labeled, unlabeled]
pull_request_review:
types: [submitted]
workflow_call:
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Is PR ready?
id: is-ready
if: >
(
(
!github.event.pull_request.draft &&
github.event.pull_request.mergeable
) ||
contains(github.event.pull_request.labels.*.name, 'ready')
)
run: true
- name: Is Dependabot?
id: is-dependabot
if: github.event.pull_request.user.login == 'dependabot[bot]'
run: true
- name: Is patch update?
id: patch-update
if: >
steps.is-dependabot.outcome == 'success' && contains(
github.event.head_commit.message, 'version-update:semver-patch'
)
run: true
- name: Auto merge PR
if: >
(
steps.is-ready.outcome == 'success' ||
steps.is-dependabot.outcome == 'success'
)
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: ""
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "automatic"
MERGE_FILTER_AUTHOR: "dependabot[bot]"
MERGE_FORKS: "true"
MERGE_RETRIES: "6"
MERGE_RETRY_SLEEP: "10000"
MERGE_REQUIRED_APPROVALS: "${{
(
steps.is-ready.outcome == 'success' ||
steps.patch-update.outcome == 'success'
) &&
0 || 1
}}"
UPDATE_LABELS: ""
UPDATE_METHOD: "rebase"