-
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (45 loc) · 1.4 KB
/
auto-merge-release.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
---
# https://github.com/peter-evans/enable-pull-request-automerge
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
os:
description: The operating system to run the workflow on
required: false
type: string
default: ubuntu-latest
pull-request-number:
description: The pull request number
required: true
type: number
actor:
description: Auto-merge only if github username matches this value
required: true
type: string
merge-method:
description: The merge method
required: false
type: string
default: merge
allowed-ref:
description: The allowed ref to merge
required: false
type: string
default: release-please--
secrets:
token:
description: Github token used to run this workflow. To trigger other workflows, pass PAT token instead of GITHUB_TOKEN
required: true
name: 🤞 Auto merge release
jobs:
auto-merge:
if: github.actor == inputs.actor && startsWith(github.head_ref, inputs.allowed-ref)
runs-on: ubuntu-latest
steps:
- name: 🤞 Auto-merge pull request
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ inputs.pull-request-number }}
merge-method: ${{ inputs.merge-method }}
token: ${{ secrets.token }}
...