M3U generator for YouTube #233
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 for YouTube | |
| permissions: | |
| contents: write | |
| on: | |
| schedule: | |
| - cron: "0 */3 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 # Updated to latest checkout | |
| - name: Set up Python 3.12 # Updated to latest Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt --upgrade | |
| - name: Run script | |
| run: | | |
| python scripts/youtube_m3ugrabber.py 2> last_run_error.log | |
| - name: Commit files | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| git add youtube.m3u last_run_error.log | |
| git commit -m "links are updated" || true | |
| git push | |
| - name: Upload logs (if failed) | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: run-logs | |
| path: last_run_error.log |