Skip to content

Commit

Permalink
add update action file
Browse files Browse the repository at this point in the history
  • Loading branch information
WaveBird authored Jul 31, 2024
1 parent 9ca4a61 commit 871746c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/sync_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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 }}

0 comments on commit 871746c

Please sign in to comment.