-
Notifications
You must be signed in to change notification settings - Fork 108
Github 工作流部署
Rockytkg edited this page Dec 16, 2024
·
6 revisions
本指南将帮助您在 GitHub 上部署 AutoMoGuDingCheckIn 项目。请按照以下步骤操作:
- 访问 AutoMoGuDingCheckIn GitHub 仓库。
- 点击右上角的
star
按钮收藏仓库,watch
按钮关注更新,最后点击fork
, 将仓库复制到您的 GitHub 账户中。
- 根据您的需求,参考下方示例配置 以及 README.md 还有 Wiki 对于配置说明的页面,修改 JSON 配置文件,确保所有信息正确无误。
- 复制修改后的 JSON 配置内容(注意不要提交更改,否则会造成个人信息泄露!!!)。
-
依次进入克隆后的仓库页面上方的:
-
Settings
→Actions secrets and variables
→Actions
-
-
点击
New repository secret
。- 在
Name
输入框中填写USER
。 - 在
Secret
输入框中输入[]
并在 输入的中括号中 粘贴刚刚复制的 JSON 配置(如果有多个用户,注意在配置一末尾添加,
始终在中括号内)。多用户示例配置
- 在
[
{
"config": {
"user": {
"phone": "工学云手机号",
"password": "工学云密码"
},
"clockIn": {
"location": {
"address": "四川省 · 成都市 · 高新区 · 在科创十一街附近",
"latitude": "34.059922",
"longitude": "118.277435",
"province": "四川省",
"city": "成都市",
"area": "高新区"
},
"imageCount": 0,
"description": [
"今天天气不错",
"今天天气很好",
"今天天气不太好"
]
},
"reportSettings": {
"daily": {
"enabled": false,
"imageCount": 0
},
"weekly": {
"enabled": true,
"imageCount": 0,
"submitTime": 4
},
"monthly": {
"enabled": false,
"imageCount": 0,
"submitTime": 29
}
},
"ai": {
"model": "gpt-4o-mini",
"apikey": "sk-osdhgosdipghpsdgjiosfvinoips",
"apiUrl": "https://api.openai.com/"
},
"pushNotifications": [
{
"type": "Server",
"enabled": true,
"sendKey": "your_key"
},
{
"type": "PushPlus",
"enabled": true,
"token": "your_token"
},
{
"type": "AnPush",
"enabled": true,
"token": "your_token",
"channel": "通道ID,多个用英文逗号隔开",
"to": "根据官方文档获取"
},
{
"type": "WxPusher",
"enabled": true,
"spt": "your_spt"
},
{
"type": "SMTP",
"enabled": true,
"host": "smtp服务地址",
"port": 465,
"username": "发件人邮箱",
"password": "smtp密码",
"from": "发件人名称",
"to": "收件人邮箱"
}
],
"device": "{brand: TA J20, systemVersion: 17, Platform: Android, isPhysicalDevice: true, incremental: K23V10A}"
}
},
{
"config": {
"user": {
"phone": "工学云手机号",
"password": "工学云密码"
},
"clockIn": {
"location": {
"address": "四川省 · 成都市 · 高新区 · 在科创十一街附近",
"latitude": "34.059922",
"longitude": "118.277435",
"province": "四川省",
"city": "成都市",
"area": "高新区"
},
"imageCount": 0,
"description": [
"今天天气不错",
"今天天气很好",
"今天天气不太好"
]
},
"reportSettings": {
"daily": {
"enabled": false,
"imageCount": 0
},
"weekly": {
"enabled": true,
"imageCount": 0,
"submitTime": 4
},
"monthly": {
"enabled": false,
"imageCount": 0,
"submitTime": 29
}
},
"ai": {
"model": "gpt-4o-mini",
"apikey": "sk-osdhgosdipghpsdgjiosfvinoips",
"apiUrl": "https://api.openai.com/"
},
"pushNotifications": [
{
"type": "Server",
"enabled": true,
"sendKey": "your_key"
},
{
"type": "PushPlus",
"enabled": true,
"token": "your_token"
},
{
"type": "AnPush",
"enabled": true,
"token": "your_token",
"channel": "通道ID,多个用英文逗号隔开",
"to": "根据官方文档获取"
},
{
"type": "WxPusher",
"enabled": true,
"spt": "your_spt"
},
{
"type": "SMTP",
"enabled": true,
"host": "smtp服务地址",
"port": 465,
"username": "发件人邮箱",
"password": "smtp密码",
"from": "发件人名称",
"to": "收件人邮箱"
}
],
"device": "{brand: TA J20, systemVersion: 17, Platform: Android, isPhysicalDevice: true, incremental: K23V10A}"
}
}
]
- 回到仓库左上角的
Actions
标签,点击左侧的打卡
工作流。 - 点击右侧的
Run workflow
按钮。 -
再次点击绿色的
Run workflow
按钮即可开始定时任务。
-
如果您是新用户,进入
Actions
后,点击页面黄色块里的按钮开启功能再继续。 -
到这里,您应该能收到手机上的通知。如果配置了推送但未收到通知,请查看工作流日志,确认运行成功。
-
默认情况下,设置了8、9、17、18 点 打卡\检查 打卡状态防止漏打,如果要修改打卡时间,请按照配置修改。
恭喜您成功部署了 AutoMoGuDingCheckIn 项目!如果在过程中遇到任何问题,请随时通过提交 issue 与我们联系。