Files
runelite/.github/workflows/merge.yml
2020-06-26 01:39:24 +02:00

39 lines
1.0 KiB
YAML

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 == 'OpenOSRS'
uses: pascalgn/automerge-action@master
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 == 'OpenOSRS'
uses: dawidd6/action-delete-branch@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branches: ${{ steps.extract_branch.outputs.branch }}