Skip to content

Commit b5c065a

Browse files
committed
Update pip-audit workflow
1 parent 9dd6819 commit b5c065a

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

.github/workflows/pip-audit.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,24 @@ on:
1010

1111
jobs:
1212
pip-audit:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-slim
1414

1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
17+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
1818
with:
1919
persist-credentials: false
2020

21-
- name: Install Python
22-
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
21+
- name: Install uv and Python
22+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7
2323
with:
24-
python-version: "3.x"
24+
python-version: "3.10"
25+
enable-cache: true
2526

26-
- name: Set up uv
27-
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
28-
29-
- name: Install project
30-
run: |
31-
uv venv /tmp/pip-audit-env
32-
VIRTUAL_ENV=/tmp/pip-audit-env uv pip install .
27+
- name: Export dependencies
28+
run: uv export --format requirements-txt --no-emit-project > requirements.txt
3329

3430
- name: Run pip-audit
3531
uses: pypa/gh-action-pip-audit@1220774d901786e6f652ae159f7b6bc8fea6d266 # v1.1.0
3632
with:
37-
virtual-environment: /tmp/pip-audit-env
33+
inputs: requirements.txt

0 commit comments

Comments
 (0)