ci: add scancode action

Check licenses on PRs

Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
This commit is contained in:
Jan Kowalewski 2020-07-14 11:27:13 +02:00 committed by Carles Cufí
parent 3512121c95
commit 7deb3aab1c
2 changed files with 41 additions and 0 deletions

16
.github/license_config.yml vendored Normal file
View File

@ -0,0 +1,16 @@
license:
main: apache-2.0
category: Permissive
copyright:
check: false
exclude:
extensions:
- yml
- yaml
- html
- rst
- conf
- cfg
langs:
- HTML

25
.github/workflows/license_check.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Scancode
on: [pull_request]
jobs:
scancode_job:
runs-on: ubuntu-latest
name: Scan code for licenses
steps:
- uses: actions/checkout@v1
- name: Scan the code
id: scancode
uses: zephyrproject-rtos/action_scancode@v2
with:
directory-to-scan: 'scan/'
- name: Artifact Upload
uses: actions/upload-artifact@v1
with:
name: scancode
path: ./artifacts
- name: Verify
run: |
test ! -s ./artifacts/report.txt || (cat ./artifacts/report.txt && exit 1 )