Skip to content

M3U Updator

M3U Updator #6481

Workflow file for this run

name: M3U Updator
on:
schedule:
- cron: '*/30 * * * *' # Runs every 30 minutes
push:
branches:
- main # Runs on push to the main branch
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script
env:
PLAYLIST_SOURCE_URL_1: ${{ secrets.PLAYLIST_SOURCE_URL_1 }}
PLAYLIST_SOURCE_URL_2: ${{ secrets.PLAYLIST_SOURCE_URL_2 }}
PLAYLIST_SOURCE_URL_3: ${{ secrets.PLAYLIST_SOURCE_URL_3 }}
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 "M3U files updated by bot 🤖"
- name: Pull latest changes from remote
run: git pull origin main --rebase
- name: Push changes
run: git push origin main