forked from phpdocker-io/phpdocker.io
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.11 KB
/
cleanup-repo.yaml
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
35
36
name: Repo cleanup (old PRs, branches and issues)
on:
schedule:
- cron: "0 0 * * *"
# Allow workflow to be manually run from the GitHub UI
workflow_dispatch:
jobs:
cleanup-repository:
runs-on: ubuntu-latest
steps:
# Mark issues and PRs with no activity as stale after a while, and close them after a while longer
- uses: actions/stale@v3
with:
stale-issue-message: 'Marking issue as stale'
stale-pr-message: 'Marking PR as stale'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-pr-labels: 'stale-exempt'
days-before-stale: 30
days-before-close: 7
# Delete old, abandoned branches
# See what constitutes an abandoned branch here: https://github.com/phpdocker-io/github-actions-delete-abandoned-branches
- uses: phpdocker-io/github-actions-delete-abandoned-branches@v1
with:
github_token: ${{ github.token }}
last_commit_age_days: 30
ignore_branches: next
# Actually get action to delete abandoned branches by disabling dry run
dry_run: no