mirror of https://github.com/leafspark/AutoGGUF
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
name: Dependency Audit
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- '**/requirements.txt'
|
|
pull_request:
|
|
paths:
|
|
- '**/requirements.txt'
|
|
schedule:
|
|
- cron: '0 0 * * *' # Run daily at midnight UTC
|
|
|
|
jobs:
|
|
audit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pip-audit
|
|
|
|
- name: Run pip-audit
|
|
run: |
|
|
pip-audit -r requirements.txt > audit_output.txt
|
|
continue-on-error: true
|
|
|
|
- name: Display audit results
|
|
run: cat audit_output.txt
|
|
|
|
- name: Create detailed report
|
|
run: |
|
|
echo "Pip Audit Report" > detailed_report.txt
|
|
echo "==================" >> detailed_report.txt
|
|
echo "" >> detailed_report.txt
|
|
echo "Date: $(date)" >> detailed_report.txt
|
|
echo "" >> detailed_report.txt
|
|
echo "Audit Results:" >> detailed_report.txt
|
|
cat audit_output.txt >> detailed_report.txt
|
|
echo "" >> detailed_report.txt
|
|
echo "Environment:" >> detailed_report.txt
|
|
python --version >> detailed_report.txt
|
|
pip --version >> detailed_report.txt
|
|
echo "" >> detailed_report.txt
|
|
echo "Requirements:" >> detailed_report.txt
|
|
cat requirements.txt >> detailed_report.txt
|
|
|
|
- name: Upload audit results
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: pip-audit-report
|
|
path: detailed_report.txt
|
|
|