Useful if you do trunk-based development
or master-only git flow
Create a file named remove-branch.yml
inside the .github/workflows
directory and paste:
name: Remove branch
on:
create
jobs:
remove-branch:
runs-on: ubuntu-latest
steps:
- uses: codelytv/no-branches@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}