-
-
Notifications
You must be signed in to change notification settings - Fork 204
38 lines (32 loc) · 1.01 KB
/
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
name: OpenOSRS - Auto merge
on:
pull_request_review:
types:
- submitted
jobs:
automerge:
name: Auto merge
runs-on: ubuntu-latest
steps:
- name: automerge
if: github.event_name == 'pull_request' && github.actor == 'Owain94'
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_FORKS: false
MERGE_LABELS: automated-pull-request
cleanup:
name: Cleanup
needs: automerge
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo $(jq --raw-output .pull_request.head.ref "$GITHUB_EVENT_PATH"))"
id: extract_branch
- name: Delete PR head branch
if: github.event_name == 'pull_request' && github.actor == 'Owain94'
uses: dawidd6/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branches: ${{ steps.extract_branch.outputs.branch }}