Switch to REUSE.toml, restrict PR license check to modified files #167
Workflow file for this run
This file contains 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: Checks | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
licenses: | |
name: "Licenses" | |
strategy: | |
fail-fast: true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Validate license (pull request) | |
if: github.event_name == 'pull_request' | |
working-directory: ${{github.workspace}} | |
run: | | |
git diff --name-only ${{ github.event.base_ref }} ${{ github.event.head_ref }} | |
git diff --name-only ${{ github.event.base_ref }} ${{ github.event.head_ref }} \ | |
| sed -E 's/\.license$//' \ | |
| sort -u \ | |
| xargs -d '\n' ls -1d 2>/dev/null \ | |
| xargs -d '\n' python3 -m pipx run reuse lint-file -- | |
- name: Validate licenses (push) | |
if: github.event_name == 'push' | |
working-directory: ${{github.workspace}} | |
run: | | |
python3 -m pipx run reuse lint | |
unicode: | |
name: "Unicode" | |
strategy: | |
fail-fast: true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Validate Unicode | |
working-directory: ${{github.workspace}} | |
run: | | |
python3 checks/checkunicode.py |