mirror of https://github.com/Free-TV/IPTV
Add daily playlist refresh workflow
parent
101c05451d
commit
41ca3bb7d9
|
|
@ -3,10 +3,15 @@ name: Update playlist
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-plalist:
|
update-playlist:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -16,6 +21,7 @@ jobs:
|
||||||
git config user.name "PlaylistBot" || true
|
git config user.name "PlaylistBot" || true
|
||||||
git config user.email "playlistbot@users.noreply.github.com" || true
|
git config user.email "playlistbot@users.noreply.github.com" || true
|
||||||
python3 ./make_playlist.py
|
python3 ./make_playlist.py
|
||||||
git add .
|
git add playlist.m3u8 playlists
|
||||||
git diff --staged --quiet || git commit --quiet -m "Update Playlist (GitHub Actions)"
|
git diff --staged --quiet && exit 0
|
||||||
git diff --quiet HEAD @{u} || git push -f origin HEAD
|
git commit --quiet -m "Update Playlist (GitHub Actions)"
|
||||||
|
git push origin HEAD:master
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue