actions: Automatically remove merged branches
This commit is contained in:
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -79,12 +79,24 @@ jobs:
|
|||||||
|
|
||||||
merge:
|
merge:
|
||||||
name: Merge
|
name: Merge
|
||||||
needs: approve
|
needs: [build, test, checkstyle, approve]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Merge pull request
|
- name: Merge pull request
|
||||||
if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS'
|
if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS'
|
||||||
uses: managedkaos/merge-pull-request@master
|
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:
|
with:
|
||||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
Reference in New Issue
Block a user