forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.84 KB
/
Copy pathlicense.yml
File metadata and controls
64 lines (56 loc) · 1.84 KB
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
name: License Check
on: pull_request
permissions:
contents: read
pull-requests: read
jobs:
manifest_license_job:
runs-on: ubuntu-24.04
name: Check licenses of new files in manifest updated modules
if: contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
steps:
- name: Checkout sources
uses: nrfconnect/action-checkout-west-update@b3257f7035e900ae50c280fe5759508f547f872d # 22 Jan 2026
with:
git-fetch-depth: 0
path: ncs/nrf
west-update-args: '-n'
- name: Install python dependencies
run: |
pip3 install -U pip
pip3 install -U setuptools
export PATH="$HOME/.local/bin:$PATH"
pip3 install -U wheel
pip3 install --user -U west
pip3 show -f west
- name: West zephyr-export
working-directory: ncs
run: |
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/bin:$PATH"
west zephyr-export
echo "ZEPHYR_BASE=$(pwd)/zephyr" >> $GITHUB_ENV
- name: Install license check script dependencies
run: |
pip3 install -U -r ncs/nrf/scripts/ci/requirements.txt
- name: Run manifest license checks
id: manifest_license_checks
env:
BASE_REF: ${{ github.base_ref }}
ZEPHYR_BASE: ${{ env.ZEPHYR_BASE }}
working-directory: ncs/nrf
run: |
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/bin:$PATH"
python3 ./scripts/ci/check_license.py \
--github \
-l ./scripts/ci/license_allow_list.yaml \
-c origin/${BASE_REF}..
- name: Upload results
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
continue-on-error: true
if: always()
with:
name: manifest-licenses.xml
path: ncs/nrf/licenses.xml
overwrite: true