.github/workflows/cert-monitor.yml #17
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 to run every Monday at 9 AM UTC | |
| schedule: | |
| - cron: '0 9 * * 1' | |
| # Allow manual trigger | |
| workflow_dispatch: | |
| jobs: | |
| monitor: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v4 | |
| - name: π Set up 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 certification monitor | |
| env: | |
| EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| run: | | |
| python main.py | |
| - name: π Upload logs (if any) | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: monitor-logs | |
| path: | | |
| *.log | |
| retention-days: 30 | |
| if-no-files-found: ignore |