Generate TV playlist and EPG #1599
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate TV playlist and EPG | |
on: | |
schedule: | |
- cron: "0 * * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
cache: "npm" | |
- name: Generate files | |
run: | | |
npm install | |
npm run start | |
git clone --depth 1 -b master https://github.com/iptv-org/epg.git | |
cd epg | |
npm install | |
npm run grab -- --channels=../bin/channels.xml --output=../bin/guide.xml | |
cd .. | |
rm -rf epg | |
- name: Commit and push | |
run: | | |
if [ -z "$(git status --porcelain)" ]; then | |
echo "No changes" | |
else | |
git config --global user.name github-actions | |
git config --global user.email github-actions@github.com | |
git add bin/* | |
git commit -m "Update playlist and EPG" | |
git push | |
fi |