Report Security Alerts #165
This file contains hidden or 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: 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) |