Delete abandoned branches #206
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete abandoned branches | |
on: | |
# Run daily at midnight | |
schedule: | |
- cron: "0 0 * * *" | |
# Allow workflow to be manually run from the GitHub UI | |
workflow_dispatch: | |
jobs: | |
cleanup_old_branches: | |
runs-on: ubuntu-latest | |
name: Satisfy my repo CDO | |
steps: | |
- name: Delete those pesky dead branches | |
uses: phpdocker-io/github-actions-delete-abandoned-branches@v2 | |
id: delete_stuff | |
with: | |
github_token: ${{ github.token }} | |
last_commit_age_days: 60 | |
allowed_prefixes: prerelease/ | |
#ignore_branches: next-version,dont-deleteme | |
#github_base_url: https://github.mycompany.com/api/v3 | |
# Disable dry run and actually get stuff deleted | |
dry_run: yes | |
- name: Get output | |
run: "echo 'Deleted branches: ${{ steps.delete_stuff.outputs.deleted_branches }}'" |