From cdb69f3d4019b4423af4c02cccea680d8f0a9784 Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Tue, 1 Oct 2019 20:55:15 +0200 Subject: [PATCH] actions: Automatically remove merged branches --- .github/workflows/build.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16eaeef330..13299a4787 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,12 +79,24 @@ jobs: merge: name: Merge - needs: approve + needs: [build, test, checkstyle, approve] runs-on: ubuntu-latest steps: - name: Merge pull request if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS' uses: managedkaos/merge-pull-request@master + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + cleanup: + name: Cleanup + needs: [build, test, checkstyle, approve, merge] + runs-on: ubuntu-latest + + steps: + - name: Remove merged branch + if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS' + uses: jessfraz/branch-cleanup-action@master with: github-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file