forked from fanmingming/live
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
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
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 }} |