name: Mark stale issues and pull requests

on:
  schedule:
    - cron: "0 12 * * *"

jobs:
  stale:
    runs-on: ubuntu-latest
    permissions:
      issues: write
      pull-requests: write

    steps:
      - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          stale-issue-message: >
            This issue has been automatically marked as stale because it has not
            had recent activity. It will be closed if no further activity occurs.
            Thank you for your contributions.
          stale-pr-message: >
            This pull request has been automatically marked as stale because it has not
            had recent activity. It will be closed if no further activity occurs.
            Thank you for your contributions.
          exempt-issue-labels: keep
          exempt-pr-labels: keep
