Skip to content

Commit 83430b6

Browse files
committed
chore(ci): automatically delete stale branches
1 parent 89bf8dd commit 83430b6

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/stale.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Stale Issue Cron
1+
name: Stale Issue and Branch Cleanup
22
on:
33
schedule:
44
# Every day at midnight
55
- cron: "0 0 * * *"
66
workflow_dispatch:
77
jobs:
8-
stale:
8+
issues:
99
runs-on: ubuntu-latest
1010
permissions:
1111
issues: write
@@ -32,3 +32,18 @@ jobs:
3232
operations-per-run: 60
3333
# Start with the oldest issues, always.
3434
ascending: true
35+
branches:
36+
name: Cleanup old branches
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v2
41+
- name: Run delete-old-branches-action
42+
uses: beatlabs/delete-old-branches-action@v0.0.9
43+
with:
44+
repo_token: ${{ github.token }}
45+
date: "6 months ago"
46+
dry_run: true
47+
delete_tags: false
48+
# extra_protected_branch_regex: ^(foo|bar)$
49+
exclude_open_pr_branches: true

0 commit comments

Comments
 (0)