Files
daily-blackout-check/.github/workflows/run-script.yml
2025-07-10 10:56:51 +03:30

50 lines
1.2 KiB
YAML

name: Run Script
on:
schedule:
- cron: "30 * * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Python Script
env:
BARGHEMAN_TOKEN: ${{ secrets.BARGHEMAN_TOKEN }}
EITAAYAR_TOKEN: ${{ secrets.EITAAYAR_TOKEN }}
BLACKOUTS_FILE: "blackouts.json"
BILL_IDS: ${{ secrets.BILL_IDS }}
CHAT_ID: ${{ secrets.CHAT_ID }}
run: |
python main.py
- name: Commit & Push updated data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git add blackouts.json
git commit -m "Update outage data" || echo "Nothing to commit"
git push