Skip to content

Stale Repo Identifier #12

Stale Repo Identifier

Stale Repo Identifier #12

Workflow file for this run

name: Stale Repo Identifier
on:
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'
jobs:
build:
name: stale repo identifier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run stale_repos tool
uses: github/stale-repos@v1
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_READ_PUBLIC_REPOS }}
ORGANIZATION: 10up
INACTIVE_DAYS: 365
ACTIVITY_METHOD: "default_branch_updated"
# 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 from STALE_REPOS.md
uses: peter-evans/create-issue-from-file@v5
with:
issue-number: ${{ env.issue_number }}
title: Stale repository report
content-filepath: ./STALE_REPOS.md
assignees: jeffpaul
token: ${{ secrets.GITHUB_TOKEN }}