delete-merged-action
ActionsGitHub Action to automatically delete merged branches, with a highly configurable branches
option.
You might not need this action, because GitHub natively supports deleting merged branches. However, you can configure exactly which branches to delete using this action. It also works well for GitHub Free accounts that don't support protected branches.
Glob rules for names of branches to delete, defaults to !master, !main, *
GitHub token to delete branches: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Merge PRs
on:
pull_request:
types:
- opened
- closed
- edited
- reopened
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: Delete merged branch
uses: koj-co/delete-merged-action@master
with:
branches: "!master, !production, *"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
An open source project by Koj.
Furnish your home in style, for as low as CHF175/month →
delete-merged-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.