Skip to content

Commit f4f660c

Browse files
committed
feat(ci): cleanup backport branches
1 parent 1752433 commit f4f660c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Cleanup backport branches
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
schedule:
8+
- cron: '0 2 * * 0' # Weekly on Sunday at 2 AM UTC
9+
workflow_dispatch:
10+
inputs:
11+
dry_run:
12+
description: 'Dry run mode'
13+
required: false
14+
default: 'true'
15+
type: choice
16+
options:
17+
- 'true'
18+
- 'false'
19+
20+
jobs:
21+
cleanup:
22+
name: Delete stale backport branches
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: fpicalausa/[email protected]
26+
with:
27+
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
28+
dry-run: ${{ github.event.inputs.dry_run || 'false' }}
29+
restrict-branches-regex: '^backport/'
30+
days-before-branch-stale: 7
31+
days-before-branch-delete: 0

0 commit comments

Comments
 (0)