diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index f51ee4de4f..7f83c5710c 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -12,10 +12,25 @@ jobs: steps: - name: automerge - uses: pascalgn/automerge-action@v0.8.0 + uses: pascalgn/automerge-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MERGE_FORKS: "false" - MERGE_LABELS: "automated-pull-request" - MERGE_REMOVE_LABELS: "" - MERGE_DELETE_BRANCH: "true" + 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 + uses: dawidd6/action-delete-branch@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branches: ${{ steps.extract_branch.outputs.branch }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 81959d28d0..ee03220f70 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,7 @@ jobs: steps: - name: PR title lint if: github.event_name == 'pull_request' - uses: seferov/pr-lint-action@v1.0.3 + uses: seferov/pr-lint-action@v1.1.1 with: title-regex: '^([\w-/ ]+): [\w ]+'