---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Stale

on:
  schedule:
    - cron: '0 8 * * *' # Every day at 08:00
  workflow_call:
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read # read repository contents
  packages: read # read GitHub Packages
  statuses: read # read commit statuses

jobs:
  stale:
    name: 🧹 Clean up stale issues and PRs
    runs-on: ubuntu-latest

    permissions:
      contents: write # only for delete-branch option
      issues: write # mark and close stale issues
      pull-requests: write # mark and close stale pull requests
    steps:
      - uses: ivuorinen/actions/stale@94a4f68a6b95ecc1677fbcac1683119fd869adf7 # v2026.07.04
