Add stale repos action #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: stale repo identifier | |
"on": | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- get_stale # for testing only - remove! | |
schedule: | |
- cron: "3 2 1 * *" | |
permissions: | |
contents: read | |
issues: write | |
jobs: | |
build: | |
name: stale repo identifier | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 SHOULD WORK ON THE MAIN | |
# 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.GHP_MFEDER }} | |
- 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 | |
token: ${{ secrets.GHP_MFEDER }} |