name: License Check

on: [push, pull_request]

jobs:
  license-check:
    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
    runs-on: ubuntu-24.04

    steps:
      - uses: actions/checkout@v6

      - name: Set up uv
        uses: astral-sh/setup-uv@v7

      - name: Run license check
        run: uvx licensecheck@2025.1.0 --show-only-failing  --zero
