forked from Shadownc/actions-checkin
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.1 KB
/
follow.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
name: follow 签到
on:
schedule:
# 每天 8 点(UTC 0 点)运行(北京时间 8 点)
- cron: '0 0 * * *'
workflow_dispatch: # 允许手动触发工作流程
jobs:
sign-in:
runs-on: ubuntu-latest
steps:
# 检出仓库中的代码
- name: Checkout code
uses: actions/checkout@v2
# 设置 Python 环境
- 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 -r requirements.txt
# 传递 GitHub Secrets 并运行follow签到脚本
- name: 运行follow签到脚本
env:
FOLLOW_CSRF_TOKEN: ${{ secrets.FOLLOW_CSRF_TOKEN }}
FOLLOW_COOKIE: ${{ secrets.FOLLOW_COOKIE }}
WEBHOOK_KEY: ${{ secrets.WEBHOOK_KEY }}
SERVER_CHAN_KEY: ${{ secrets.SERVER_CHAN_KEY }}
SERVER_CHAN_CHANNEL: ${{secrets.SERVER_CHAN_CHANNEL}}
QMSG_KEY: ${{ secrets.QMSG_KEY }}
run: |
python scripts/follow.py