License Scanning for Python #196
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: License Scanning for Python | |
| on: | |
| schedule: | |
| - cron: '0 8,18 * * 1-5' | |
| push: | |
| paths: | |
| - requirements.txt | |
| - 'pyproject.toml' | |
| - '.github/workflows/license-scanning-python.yml' | |
| env: | |
| ALLOW_LICENSES: "MIT License;Apache Software License;BSD License" | |
| # IGNORE_PACKAGES: "" | |
| jobs: | |
| scan: | |
| name: Scan for licenses | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install pip-licenses | |
| run: pip3 install pip-licenses | |
| - name: Scan for licenses | |
| run: pip-licenses --allow-only="${{ env.ALLOW_LICENSES }}" # --ignore-packages="${{ env.IGNORE_PACKAGES }}" | |
| working-directory: . |