Skip to content

Daily EPG Generation #904

Daily EPG Generation

Daily EPG Generation #904

Workflow file for this run

name: Daily EPG Generation
on:
schedule:
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
push:
workflow_dispatch:
permissions:
contents: write
jobs:
generate_epg:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Install Dependencies
run: uv sync --frozen
- name: Setup git config
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@users.noreply.github.com'
- name: Run EPG Generation Script
run: uv run python epg_scraper.py
- name: Rebase epg branch
run: git fetch origin && git add -f epg.xml && git stash save "EPG" && git checkout -b epg origin/epg && git checkout stash -- epg.xml
- name: Commit XML file
run: |
git commit -m "Auto-generated EPG for $(date +"%Y-%m-%d")" epg.xml
- name: Push changes
run: git push origin epg