.github/workflows/cert-monitor.yml #7
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: Certification Monitor | |
| on: | |
| schedule: | |
| - cron: '0 9 * * 1' # Every Monday 9 AM UTC | |
| workflow_dispatch: | |
| jobs: | |
| monitor: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required to push changes | |
| steps: | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 🐍 Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: 📦 Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: 🔍 Run monitor | |
| env: | |
| EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} | |
| run: python main.py | |
| - name: 💾 Save snapshots | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add data/cert_snapshots.json | |
| git diff --quiet && git diff --staged --quiet || (git commit -m "Update snapshots [skip ci]" && git push) |