build: add license check

This commit is contained in:
Vincent Bernat
2024-04-08 19:22:04 +02:00
parent c4dd0cc3ba
commit 3a49df6618
3 changed files with 16 additions and 1 deletions

View File

@@ -174,6 +174,18 @@ jobs:
- name: Build and test JS frontend - name: Build and test JS frontend
run: make console/data/frontend test-js run: make console/data/frontend test-js
licenses:
name: ⚖️ Check licenses
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: License check
run: make licensecheck
docker: docker:
name: 🐋 Build Docker images name: 🐋 Build Docker images
needs: needs:

View File

@@ -1,4 +1,5 @@
--- ---
# List of licenses compatible with AGPL-3.0-only
allowlist: allowlist:
- Apache-2.0 - Apache-2.0
- BSD-3-Clause - BSD-3-Clause
@@ -7,3 +8,5 @@ allowlist:
- MPL-2.0 - MPL-2.0
- MIT - MIT
- ISC - ISC
- WTFPL
- 0BSD

View File

@@ -190,7 +190,7 @@ licensecheck: console/frontend/node_modules | $(WWHRD) ; $(info $(M) check depen
$Q err=0 ; go mod vendor && $(WWHRD) --quiet check || err=$$? ; rm -rf vendor/ ; exit $$err $Q err=0 ; go mod vendor && $(WWHRD) --quiet check || err=$$? ; rm -rf vendor/ ; exit $$err
$Q cd console/frontend ; npm exec --no -- license-compliance \ $Q cd console/frontend ; npm exec --no -- license-compliance \
--production \ --production \
--allow "MIT;ISC;Apache-2.0;BSD-3-Clause;WTFPL;0BSD" \ --allow "$$(sed -n 's/^ - //p' ../../.wwhrd.yml | paste -sd ";")" \
--report detailed --report detailed
.PHONY: clean mrproper .PHONY: clean mrproper