-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (51 loc) · 1.99 KB
/
load_data.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Daily Update and Commit
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-and-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: merge
run: |
cd load
python merge_main.py
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git diff
git add -f .
if ! git diff --staged --quiet; then
git commit -m 'Daily update of load'
git push --force
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get the version
id: get_version
run: echo ::set-output name=RELEASE_VERSION::$(date +%Y%m%d)
- name: Create or Update Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.RELEASE_VERSION }}
release_name: Release ${{ steps.get_version.outputs.RELEASE_VERSION }}
draft: false
prerelease: false
overwrite: true
- name: Purge Jsdelivr Cache
run: |
curl https://purge.jsdelivr.net/gh/LuckyLearning/TV@latest/fmm.txt
curl https://purge.jsdelivr.net/gh/LuckyLearning/TV@latest/local.txt
curl https://purge.jsdelivr.net/gh/LuckyLearning/TV@latest/use.txt
curl https://purge.jsdelivr.net/gh/LuckyLearning/TV@latest/load/merge_ipv6.txt
curl https://purge.jsdelivr.net/gh/LuckyLearning/TV@latest/load/merged_output.txt
curl https://purge.jsdelivr.net/gh/LuckyLearning/TV@latest/load/others_output.txt
curl https://purge.jsdelivr.net/gh/LuckyLearning/TV@latest/load/tvbox/ipv6.txt
curl https://purge.jsdelivr.net/gh/LuckyLearning/TV@latest/load/merged_output.m3u