-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (40 loc) · 1.2 KB
/
rebook.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
name: 重新预约此位置
on:
workflow_dispatch:
repository_dispatch:
types: [schedule-run]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 安装 Python 3.12
uses: actions/setup-python@v2
with:
python-version: '3.12.0'
architecture: 'x64'
- name: 检查 Python 版本
run: python --version
- name: 检出仓库代码到工作区
uses: actions/checkout@v2
- name: 应用环境变量
uses: microsoft/variable-substitution@v1
with:
files: 'py/main/config.yml' # 注意文件路径
env:
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
BARK_URL: ${{ secrets.BARK_URL }}
ANPUSH_TOKEN: ${{ secrets.ANPUSH_TOKEN }}
ANPUSH_CHANNEL: ${{ secrets.ANPUSH_CHANNEL }}
MODE: "5"
DATE: "today"
# - name: 显示配置 YAML
# run: cat py/main/config.yml
- name: 安装所需依赖
run: |
pip install -r py/main/requirements.txt
- name: 运行 Python 脚本
run: |
python py/main/get_seat.py