M3U Generator #113
This file contains hidden or 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: M3U Generator | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| 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.x' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests | |
| - name: Run script | |
| run: | | |
| chmod +x autorun.sh | |
| ./autorun.sh | |
| - name: Commit changes if any | |
| run: | | |
| git config --global user.email "action@github.com" | |
| git config --global user.name "GitHub Action" | |
| git add -A | |
| git diff --quiet && git diff --staged --quiet || git commit -m "Update India-only IPTV playlist 🤖" | |
| - name: Push changes | |
| run: git push origin main || echo "No changes to push" |