Update .github/workflows/license-check-python.yml #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python License Check | |
| on: | |
| push: | |
| jobs: | |
| license-check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Create GitHub App Token able to read all CVector repos | |
| id: app | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ vars.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| permission-contents: read | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3 | |
| - name: Configure git to use app token for private repos | |
| run: | | |
| git config --global url."https://x-access-token:${{ steps.app.outputs.token }}@github.com/".insteadOf "https://github.com/" | |
| - name: Run license check | |
| run: | | |
| SKIP_DEPS=( | |
| cvec-commons # Internal library, not published to PyPI | |
| wrapt # BSD-2-Clause license | |
| ) | |
| find . \( -name 'pyproject.toml' -o -name 'requirements.txt' \) -print0 | \ | |
| xargs -0 -r uvx licensecheck@2025.1.0 --zero \ | |
| --skip-dependencies "${SKIP_DEPS[@]}" \ | |
| --ignore-licenses MPL \ | |
| --requirements-paths |