-
Notifications
You must be signed in to change notification settings - Fork 174
42 lines (35 loc) · 1.14 KB
/
69yuncheckin2.yaml
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
name: Python CI 2
on:
# 每天0点1分触发(UTC时间)
schedule:
- cron: '1 0 * * *'
# 允许手动触发工作流
workflow_dispatch:
# 提交代码到指定分支时触发
push:
branches:
- main # 只在主分支提交时触发
jobs:
build:
runs-on: ubuntu-latest
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
CHAT_ID: ${{ secrets.CHAT_ID }} # 这里设置可以用于多个账户
USER1: ${{ secrets.USER1 }} # 用户1
PASS1: ${{ secrets.PASS1 }} # 密码1
USER2: ${{ secrets.USER2 }} # 用户2
PASS2: ${{ secrets.PASS2 }} # 密码2
# 可以继续扩展更多用户和密码
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # 假设你的项目有 requirements.txt
- name: Run Python script
run: python 69yun2.py # 执行你的 Python 脚本