Live streaming source #391
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: Live streaming source | |
| on: | |
| schedule: | |
| - cron: "0 8 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| sort_channels: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install requests | |
| - name: Run Python script | |
| run: | | |
| python TV/sort_channels.py | |
| - name: Commit and push sorted file | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add TV/live.txt | |
| git commit -m "Update sorted channels" || echo "No changes to commit" | |
| git push | |
| clean: | |
| needs: sort_channels | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Delete older workflow runs and artifacts | |
| uses: Mattraks/delete-workflow-runs@main | |
| with: | |
| token: ${{ github.token }} | |
| repository: ${{ github.repository }} | |
| retain_days: 1 | |
| keep_minimum_runs: 1 |