Skip to content

Commit 6b47ac7

Browse files
committed
chore: add pip audit
1 parent a950248 commit 6b47ac7

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/pip_audit.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: pip_audit
3+
4+
'on':
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
schedule:
11+
- cron: '10 2 * * 1,3'
12+
13+
jobs:
14+
pip_audit:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: 3.11
26+
27+
- name: Set up Poetry
28+
uses: snok/install-poetry@v1
29+
30+
- name: Install poetry-plugin-export
31+
run: |
32+
poetry self add poetry-plugin-export
33+
34+
- name: Generate requirements
35+
run: |
36+
poetry export -f requirements.txt -o requirements.txt
37+
poetry export --with dev -f requirements.txt -o dev-requirements.txt
38+
39+
- name: Run pip-audit
40+
uses: pypa/[email protected]
41+
with:
42+
inputs: requirements.txt dev-requirements.txt
43+
...

0 commit comments

Comments
 (0)