name: 'Close stale issues and PRs'
on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *'

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@main
        with:
          stale-issue-message: 'This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days'
          days-before-stale: 45
          days-before-close: 7
          stale-issue-label: stale
          stale-pr-label: stale