Skip to content

.github/workflows/cert-monitor.yml #5

.github/workflows/cert-monitor.yml

.github/workflows/cert-monitor.yml #5

Workflow file for this run

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)