nowtur1 action #43
This file contains 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: nowtur1 action | |
on: | |
schedule: | |
- cron: '03 */3 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: config | |
run: | | |
git config --global user.email "<>" | |
git config --global user.name "nowtur1 bot" | |
- name: fetch content nowtur1 | |
run: | | |
final_url=$(python3 ressources/tur/nowtur1.py) | |
echo "erstrm=${final_url}" >> $GITHUB_ENV | |
dastrm=$(echo $final_url | sed 's/nowtv-live-ad.ercdn.net\/nowtv\/playlist.m3u8/nowtv.daioncdn.net\/nowtv\/nowtv.m3u8/') | |
echo "dastrm=${dastrm}" >> $GITHUB_ENV | |
- name: Replace Text | |
run: | | |
erstrm=${erstrm} | |
dastrm=${dastrm} | |
sed -i "\|daioncdn.net/nowtv| c $dastrm" all.m3u | |
sed -i "\|ercdn.net/nowtv| c $erstrm" all.m3u | |
sed -i "\|daioncdn.net/nowtv| c $dastrm" ressources/allgr.m3u | |
sed -i "\|ercdn.net/nowtv| c $erstrm" ressources/allgr.m3u | |
- name: git add | |
run: | | |
git add -A | |
ls -la | |
- name: commit & push | |
run: | | |
git pull | |
git add all.m3u ressources/allgr.m3u | |
git commit -m "nowtur1 updated" | |
git push |