Skip to content

Cleanup Stale Branches #37

Cleanup Stale Branches

Cleanup Stale Branches #37

# .github/workflows/cleanup-stale-branch.yaml
name: Cleanup Stale Branches
run-name: Stale Branches Cleanup Running
on:
# Allows to run workflow manually from the Actions tab
workflow_dispatch:
schedule:
# Runs at 4:00 AM every day (Monday to Sunday)
- cron: '0 4 * * *'
permissions:
contents: write
jobs:
cleanup_stale_branches:
# Only run if the repository is not a fork and not archived
if: github.event.repository.fork == false && github.event.repository.archived == false
runs-on: ubuntu-latest
steps:
- name: Cleanup Stale Branches
uses: crazy-matt/manage-stale-branches@c1b2156178222eaf8bc7f8a4bf7084595b3e8968
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
stale-duration: 90d
suggested-duration: 90d
concurrency: 10
dry-run: true
archive-stale: false
rate-limit-threshold: 20
exclude-patterns: |
master
^((?!dependabot))
^((?!release))