Skip to content

Commit e1ee673

Browse files
authored
Create license_check.yml
taken from zephyrproject upstream
1 parent 56f878b commit e1ee673

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/license_check.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Scancode
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
scancode_job:
7+
runs-on: ubuntu-20.04
8+
name: Scan code for licenses
9+
steps:
10+
- name: Checkout the code
11+
uses: actions/checkout@v1
12+
- name: Scan the code
13+
id: scancode
14+
uses: zephyrproject-rtos/action_scancode@v4
15+
with:
16+
directory-to-scan: 'scan/'
17+
- name: Artifact Upload
18+
uses: actions/upload-artifact@v1
19+
with:
20+
name: scancode
21+
path: ./artifacts
22+
23+
- name: Verify
24+
run: |
25+
if [ -s ./artifacts/report.txt ]; then
26+
report=$(cat ./artifacts/report.txt)
27+
report="${report//'%'/'%25'}"
28+
report="${report//$'\n'/'%0A'}"
29+
report="${report//$'\r'/'%0D'}"
30+
echo "::error file=./artifacts/report.txt::$report"
31+
exit 1
32+
fi

0 commit comments

Comments
 (0)