Skip to content

Update IPTV Channels #16

Update IPTV Channels

Update IPTV Channels #16

Workflow file for this run

name: Update IPTV Channels
on:
schedule:
# Run twice a day (every 12 hours)
- cron: '0 */12 * * *'
workflow_dispatch: # Allows manual trigger from the GitHub Actions tab
jobs:
update-channels:
runs-on: ubuntu-latest
permissions:
# Required for checking out and writing commits back to repository
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-name: '3.x'
- name: Run Stream Checker
run: python check_streams.py
- name: Commit and Push Changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add channels.js
# Check if there are changes before committing to avoid failing the workflow
if git diff --quiet && git diff --staged --quiet; then
echo "No changes in channels.js detected. Skipping commit."
else
git commit -m "chore: auto-update IPTV channels list [skip ci]"
git push
fi