Skip to content

Commit ec0e1db

Browse files
authored
Create license-compliance.yml
1 parent 9035e50 commit ec0e1db

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: License Compliance
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
license-compliance:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: 3.9
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m venv venv
27+
. venv/bin/activate
28+
pip install -r requirements.txt
29+
30+
- name: Check licenses
31+
run: |
32+
. venv/bin/activate
33+
pip install pip-licenses
34+
pip-licenses --from=mixed --output-file=dependencies_licenses.txt
35+
36+
- name: Upload license reports
37+
uses: actions/upload-artifact@v3
38+
with:
39+
name: dependencies-license-reports
40+
path: dependencies_licenses.txt
41+
42+
- name: License compliance summary
43+
run: echo "License compliance check completed. See artifacts for details."

0 commit comments

Comments
 (0)