Skip to content

Switch to REUSE.toml, restrict PR license check to modified files #171

Switch to REUSE.toml, restrict PR license check to modified files

Switch to REUSE.toml, restrict PR license check to modified files #171

Workflow file for this run

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: |
baseSha='${{ github.event.pull_request.base.sha }}'
git fetch origin --depth=1 $baseSha
git diff --name-only $baseSha HEAD \
| 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