Skip to content

Commit 9f07fc0

Browse files
committed
Add stale repos action
Signed-off-by: Matej Feder <[email protected]>
1 parent 385d5e3 commit 9f07fc0

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/stale-repos.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: stale repo identifier
3+
4+
"on":
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
schedule:
10+
- cron: "3 2 1 * *"
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
name: stale repo identifier
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Run stale_repos tool
24+
uses: github/[email protected]
25+
env:
26+
GH_TOKEN: ${{ secrets.GHP_MFEDER }}
27+
ORGANIZATION: SovereignCloudStack
28+
INACTIVE_DAYS: 365
29+
ACTIVITY_METHOD: "pushed"
30+
ADDITIONAL_METRICS: "release,pr"
31+
32+
# This next step updates an existing issue. If you want a new issue every time, remove this step and remove the `issue-number: ${{ env.issue_number }}` line below.
33+
- name: Check for the stale report issue
34+
run: |
35+
ISSUE_NUMBER=$(gh search issues "Stale repository report" --match title --json number --jq ".[0].number")
36+
echo "issue_number=$ISSUE_NUMBER" >> "$GITHUB_ENV"
37+
env:
38+
GH_TOKEN: ${{ secrets.GHP_MFEDER }}
39+
40+
- name: Create issue
41+
uses: peter-evans/create-issue-from-file@v5
42+
with:
43+
issue-number: ${{ env.issue_number }}
44+
title: Stale repository report
45+
content-filepath: ./stale_repos.md
46+
token: ${{ secrets.GHP_MFEDER }}
47+
labels: |
48+
report

0 commit comments

Comments
 (0)