actions: Remove branch after auto merge

This commit is contained in:
Owain van Brakel
2019-11-04 01:46:24 +01:00
committed by GitHub
parent 97ba0013b2
commit 103b82bd9f

View File

@@ -17,4 +17,21 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_FORKS: false
LABELS: automated-pull-request
AUTOMERGE: automated-pull-request
AUTOMERGE: 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
uses: dawidd6/action-delete-branch@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}
be_kind: true