Skip to content

Daily EPG Generation #737

Daily EPG Generation

Daily EPG Generation #737

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@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Dependencies
run: pip install -r requirements.txt
- 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: 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
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: epg