-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (52 loc) · 1.56 KB
/
Copy pathpython-app.yml
File metadata and controls
73 lines (52 loc) · 1.56 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
# This workflow will run every day at 00:00 UTC
name: Update TimeTable Everyday
env:
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
###### preferences 配置信息 ######
# 在这里修改学期代码,用逗号分隔。
# Set termcode here, separated by commas.
# Example: 2502,2506
TERM: "2502,2506"
# Change language here, uncomment to use english version
# LOCALE: "en_US"
on:
workflow_dispatch:
# 在这里修改定时执行的时间
# 每天的 00:00 运行
# Uncomment the following lines to enable scheduled runs
# schedule:
# - cron: '0 0 * * *'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12.6
uses: actions/setup-python@v3
with:
python-version: "3.12.6"
- name: setup-chromedriver
uses: nanasess/setup-chromedriver@v2.2.2
- name: init driver
run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: run mainCode
run: |
python ./main.py
- name: commit
run: |
git config --global user.email calRobot@github.com
git config --global user.name githubAction
git add -f .
git commit -m "update" -a
- name: Push changes
uses: ad-m/github-push-action@master