.github/workflows/cert-monitor.yml #1
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 | |
| steps: | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v4 | |
| - 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" | |
| git config user.email "[email protected]" | |
| git add data/cert_snapshots.json | |
| git diff --quiet && git diff --staged --quiet || git commit -m "Update snapshots [skip ci]" | |
| git push |