Skip to content

Report Security Alerts #165

Report Security Alerts

Report Security Alerts #165

name: Report Security Alerts
on:
schedule:
- cron: '0 2 * * *' # Daily at 2:00 AM UTC
workflow_dispatch:
permissions:
contents: write
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Generate security alerts report
env:
GH_TOKEN: ${{ github.token }}
run: python scripts/report_security.py > docs/security.html
- name: Commit and push to gh-pages
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/security.html
git diff --quiet && git diff --staged --quiet || (git commit -m "Update security alerts report" && git pull --rebase && git push)