forked from Azure/Azure-Sentinel
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 1020 Bytes
/
cleanup-stale-branch.yaml
File metadata and controls
34 lines (31 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# .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))