-
-
Notifications
You must be signed in to change notification settings - Fork 156
49 lines (42 loc) · 1.25 KB
/
main.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
name: Update Chinese EPG File
on:
workflow_dispatch:
schedule:
- cron: '30 * * * *'
push:
branches:
- master
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: set variables
run: |
echo "UPDATE_TIME=$(TZ='Asia/Shanghai' date +%Y-%m-%d\ %H:%M\ %Z)" >> $GITHUB_ENV
- name: set up python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: prepare release
uses: actions/checkout@v2
with:
path: release
ref: master
- name: prepare generater
uses: actions/checkout@v2
with:
repository: BurningC4/getepg
ssh-key: ${{ secrets.GETEPG }}
path: getepg
ref: main
- name: get new epg file
run: |
sudo pip3 install -r getepg/requirements.txt
sudo python3 getepg/getepg.py --file release/guide.xml
- name: push release
run: |
git -C release config --local user.name github-actions
git -C release config --local user.email [email protected]
git -C release add guide.xml
git -C release commit -m "auto update at ${{ env.UPDATE_TIME }}" --allow-empty
git -C release push