-
Notifications
You must be signed in to change notification settings - Fork 87
45 lines (37 loc) · 1.48 KB
/
run.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
name: Run On Windows
on:
workflow_dispatch:
schedule:
# 参考 https://jasonet.co/posts/scheduled-actions/
# note: 这里是GMT时间,北京时间减去八小时即可。如北京时间 22:30 => GMT 14:30
# re: 目前已知在github的action runner上,访问国内相关的接口会大概率超时,如pskey和skey的获取,以及访问道聚城相关接口,故而先测试性的每日十点半运行一次,其他时候就不运行了
# minute hour day month dayOfWeek
- cron: '30 14 * * *' # GMT 14:30 => 北京时间 22:30
#- cron: '30 16 * * *' # GMT 16:30(前一天) => 北京时间 00:30
jobs:
run:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install Requirements Windows
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Set time zone
uses: szenius/[email protected]
with:
timezoneLinux: "Asia/Shanghai"
timezoneMacos: "Asia/Shanghai"
timezoneWindows: "China Standard Time"
- name: Run
env:
DJC_HELPER_CONFIG_TOML: ${{ secrets.DJC_HELPER_CONFIG_TOML }}
run: |
echo "$DJC_HELPER_CONFIG_TOML" > ./config.toml
python main.py