🧹 Stale repository identifier #4
This file contains hidden or 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 repository identifier | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "3 2 1 * *" | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| stale-repository-identifier: | |
| name: 🧹 Stale repository identifier | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🔑 Get GitHub App Token | |
| uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: 📑 Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: 🧹 Identify stale repositories | |
| uses: github/stale-repos@ed7d69735687683c55afad372bd51d8a1a2567b5 # v4.0.0 | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| EXEMPT_TOPICS: "keep,template" | |
| INACTIVE_DAYS: 365 | |
| ADDITIONAL_METRICS: "release,pr" | |
| ORGANIZATION: devantler-tech | |
| - 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 or update stale report issue | |
| uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1 | |
| with: | |
| issue-number: ${{ env.issue_number }} | |
| title: 📄 Stale repository report | |
| content-filepath: ./stale_repos.md | |
| assignees: devantler | |
| token: ${{ secrets.GITHUB_TOKEN }} |