forked from Samsung/ONE-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (53 loc) · 1.71 KB
/
check-license.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: License Verification
on:
pull_request:
branches: [ main ]
paths: [ 'package.json' ]
jobs:
license_verification:
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'PR/NO TEST') }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v2
with:
ref: refs/pull/${{ github.event.number }}/merge
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: npm install
- run: npx license-checker --unknown --json --out license_list.json
- shell: bash
run: npx ts-node infra/license/license-checker.ts license_list.json ${{ matrix.os }}
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}.json
path: ${{ matrix.os }}.json
retention-days: 1
report_verification_result:
runs-on: ubuntu-latest
needs: [ license_verification ]
steps:
- uses: actions/checkout@v2
with:
ref: refs/pull/${{ github.event.number }}/merge
- uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/download-artifact@v3
with:
name: ubuntu-latest.json
- uses: actions/download-artifact@v3
with:
name: macos-latest.json
- uses: actions/download-artifact@v3
with:
name: windows-latest.json
- run: npm install
- run: npx ts-node infra/license/check-result-formatter.ts ubuntu-latest.json windows-latest.json macos-latest.json
- if: ${{ hashFiles('license_check_result.fail') }}
run: |
cat license_check_result.md
exit 1