forked from AiRanthem/xmu-daily-report
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.56 KB
/
XMU_Auto_Check_In.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: XMU_Auto_Check_In
on:
push:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: '30 0 * * *'
# cron表达式,Actions时区是UTC时间,北京时间要往前推8个小时。
# 第一位30指代分钟,第二位0指代小时,24小时制,这个设置即为北京时间8:30
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install selenium requests
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Setup Chromedriver
uses: nanasess/setup-chromedriver@master
- name: Run the CheckIn Shell
env:
USERNAME: ${{ secrets.USERNAME }}
PASSWD: ${{ secrets.PASSWD }}
PASSWD_VPN: ${{ secrets.PASSWD_VPN }}
FROM_ADDR: ${{ secrets.FROM_ADDR }}
MAIL_PWD: ${{ secrets.MAIL_PWD }}
TO_ADDR: ${{ secrets.TO_ADDR }}
SMTP_SERVER: ${{ secrets.SMTP_SERVER }}
SERVER_KEY: ${{ secrets.SERVER_KEY }}
CONFIG: ${{ secrets.CONFIG }}
ENV: prod
TZ: Asia/Shanghai
# 时区配置为Asia/Shanghai
run: |
./XMUAutoCheckIn.sh