-
Notifications
You must be signed in to change notification settings - Fork 678
84 lines (73 loc) · 2.45 KB
/
check-licenses.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Check licenses
on:
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
packages: read
jobs:
check-licenses:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
LICENSES: "'Apache-2.0' 'GPL-3.0-only' 'GPL-3.0-or-later WITH Classpath-exception-2.0'"
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout sources
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- uses: actions/[email protected]
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
scope: "@paritytech"
- name: Check the licenses in Polkadot
run: |
shopt -s globstar
npx @paritytech/license-scanner scan \
--ensure-licenses ${{ env.LICENSES }} \
-- ./polkadot/**/*.rs
- name: Check the licenses in Cumulus
run: |
shopt -s globstar
npx @paritytech/license-scanner scan \
--ensure-licenses ${{ env.LICENSES }} \
-- ./cumulus/**/*.rs
- name: Check the licenses in Substrate
run: |
shopt -s globstar
npx @paritytech/license-scanner scan \
--ensure-licenses ${{ env.LICENSES }} \
-- ./substrate/**/*.rs
check-product-references:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout sources
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- uses: actions/[email protected]
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
scope: "@paritytech"
- name: Check the product references in Polkadot
run: |
shopt -s globstar
npx @paritytech/license-scanner scan \
--ensure-product 'Polkadot' \
-- ./polkadot/**/*.rs
- name: Check the product references in Cumulus
run: |
shopt -s globstar
npx @paritytech/license-scanner scan \
--ensure-product 'Cumulus' \
-- ./cumulus/**/*.rs
- name: Check the product references in Substrate
run: |
shopt -s globstar
npx @paritytech/license-scanner scan \
--ensure-product 'Substrate' \
-- ./substrate/**/*.rs