Sync and Update ipv6.m3u #280
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: Sync and Update ipv6.m3u | |
on: | |
schedule: | |
- cron: '0 0 * * *' # 每天一次同步 | |
workflow_dispatch: | |
jobs: | |
sync-and-update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
- name: Set up Git | |
run: | | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git remote add upstream https://github.com/fanmingming/live.git | |
git fetch upstream | |
- name: Get upstream latest branch | |
run: | | |
git checkout upstream/main -- tv/m3u/ipv6.m3u | |
- name: Replace text in ipv6.m3u | |
run: | | |
sed -i 's/PLTV/TVOD/g' tv/m3u/ipv6.m3u | |
- name: Commit changes | |
run: | | |
git add . | |
git commit -m 'Update ipv6.m3u: Replace PLTV with TVOD' | |
git push -f origin main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |