Weekly Digest #3
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: Weekly Digest | |
| on: | |
| schedule: | |
| - cron: "0 8 * * 0" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: pip install -r scraper/requirements.txt | |
| - name: Run scraper | |
| env: | |
| NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | |
| run: python -m scraper.main | |
| - name: Commit digest | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add data/digests/ | |
| git diff --cached --quiet || git commit -m "Weekly digest $(date +%Y-%m-%d)" | |
| git push |