-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (35 loc) · 1.13 KB
/
Copy pathdaily_epg.yml
File metadata and controls
46 lines (35 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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