forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add license check using github actions
Use Github for license checks. Signed-off-by: Anas Nashif <[email protected]>
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 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,16 @@ | ||
license: | ||
main: apache-2.0 | ||
report_missing: true | ||
category: Permissive | ||
copyright: | ||
check: true | ||
exclude: | ||
extensions: | ||
- yml | ||
- yaml | ||
- html | ||
- rst | ||
- conf | ||
- cfg | ||
langs: | ||
- HTML |
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,32 @@ | ||
name: Scancode | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
scancode_job: | ||
runs-on: ubuntu-latest | ||
name: Scan code for licenses | ||
steps: | ||
- name: Checkout the code | ||
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: | | ||
if [ -s ./artifacts/report.txt ]; then | ||
report=$(cat ./artifacts/report.txt) | ||
report="${report//'%'/'%25'}" | ||
report="${report//$'\n'/'%0A'}" | ||
report="${report//$'\r'/'%0D'}" | ||
echo "::error file=./artifacts/report.txt::$report" | ||
exit 1 | ||
fi |