name: Weekly Slack report

on:
  schedule:
    - cron: "0 10 * * 4"  # Thursdays 10:00 UTC
  workflow_dispatch:

permissions: read-all

jobs:
  report:
    runs-on: ubuntu-24.04
    if: github.repository_owner == 'open-telemetry'
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          sparse-checkout: .github/workflows/scripts
      - name: Run weekly-slack-report.sh
        run: ./.github/workflows/scripts/weekly-slack-report.sh
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          REPO: ${{ github.repository }}
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
