-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add a license checker generate the required csv write to output file and install global license check print if fails exclude permissive licenses in report
- Loading branch information
1 parent
dff5f07
commit 60d9c80
Showing
3 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Check licenses | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
license_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.14.2' | ||
- name: Checkout Ref | ||
uses: actions/checkout@v1 | ||
- name: Install dependencies | ||
run: npm install && npm install -g license-checker | ||
- name: Generate license-checker CSV file | ||
run: license-checker --start --production --csv --out npm-license-checker.csv | ||
- name: Check license-checker CSV file without headers | ||
id: license_check_report | ||
uses: pilosus/action-pip-license-checker@v2 | ||
with: | ||
external: 'npm-license-checker.csv' | ||
external-format: 'csv' | ||
external-options: '{:skip-header true}' | ||
fail: 'StrongCopyleft,NetworkCopyleft,Other,Error' | ||
fails-only: true | ||
exclude: 'evolv-ai*,SentientTechnologies*' | ||
exclude-license: '(?i)copyright' | ||
totals: true | ||
verbose: 1 | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
- name: Print incorrect dependencies (failure) | ||
if: failure() | ||
run: license-checker --start --production --exclude 'BSD, MIT, Apache-2.0' | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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