Dependency audit #943
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dependency audit | |
env: | |
POETRY_VERSION: "1.3.2" | |
on: | |
push: | |
paths: | |
- .github/workflows/audit.yaml | |
- pyproject.toml | |
- poetry.lock | |
pull_request: | |
types: [opened, reopened, synchronize] | |
paths: | |
- .github/workflows/audit.yaml | |
- pyproject.toml | |
- poetry.lock | |
schedule: | |
- cron: "15 2 * * *" | |
jobs: | |
export-requirements: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: pipx install poetry==${{env.POETRY_VERSION}} | |
- name: Export requirements.txt | |
run: poetry export --without-hashes --with dev -f requirements.txt -o requirements.txt | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: requirements.txt | |
path: requirements.txt | |
if-no-files-found: error | |
pip-audit: | |
runs-on: ubuntu-latest | |
needs: export-requirements | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: requirements.txt | |
path: requirements.txt | |
- uses: pypa/[email protected] | |
with: | |
inputs: requirements.txt/requirements.txt |