Skip to content

Sync and Update ipv6.m3u #15

Sync and Update ipv6.m3u

Sync and Update ipv6.m3u #15

Workflow file for this run

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
git checkout upstream/main -- tv/m3u/ipv6Plus.m3u
- name: Replace text in ipv6.m3u
run: |
sed -i 's/PLTV/TVOD/g' tv/m3u/ipv6.m3u
sed -i 's/PLTV/TVOD/g' tv/m3u/ipv6Plus.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 }}