name: License Cleanup

on:
  schedule:
    - cron: '0 * * * *'  # every hour
  workflow_dispatch:

jobs:
  enforce:
    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683  # v4

    - name: Enforce license permissions
      env:
        GH_LICENSE_TOKEN: ${{ secrets.GH_LICENSE_TOKEN }}
        SLACK_BOT_TOKEN:  ${{ secrets.SLACK_BOT_TOKEN }}
      run: python3 .github/scripts/license_enforcer.py
