name: 'Close stale issues and PRs'
on:
  schedule:
    - cron: '0 0 * * *'  # every day at 00:00 UTC

permissions:
  issues: write
  pull-requests: write

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
        with:
          days-before-stale: 90
          days-before-close: 21
          stale-issue-label: stale
          stale-pr-label: stale
