Skip to content

Commit

Permalink
Add stale repos action
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Feder <matej.feder@dnation.cloud>
  • Loading branch information
matofeder committed Feb 9, 2025
1 parent 385d5e3 commit 91c2a3f
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/stale-repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: stale repo identifier

"on":
workflow_dispatch:
push:
branches:
- main
- get_stale # Only for tests
schedule:
- cron: "3 2 1 * *"

permissions:
contents: read

jobs:
build:
name: stale repo identifier
runs-on: ubuntu-latest

permissions:
contents: read
issues: write

steps:
- uses: actions/checkout@v3

- name: Run stale_repos tool
uses: github/stale-repos@v2.1.1
env:
GH_TOKEN: ${{ secrets.GHP_MFEDER }}
ORGANIZATION: SovereignCloudStack
INACTIVE_DAYS: 365
ACTIVITY_METHOD: "pushed"
ADDITIONAL_METRICS: "release,pr"

# 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.
- name: Check for the stale report issue
run: |
ISSUE_NUMBER=$(gh search issues "Stale repository report" --match title --json number --jq ".[0].number")
echo "issue_number=$ISSUE_NUMBER" >> "$GITHUB_ENV"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create issue
uses: peter-evans/create-issue-from-file@v5
with:
issue-number: ${{ env.issue_number }}
title: Stale repository report
content-filepath: ./stale_repos.md
labels: |
report

0 comments on commit 91c2a3f

Please sign in to comment.