Skip to content

Github 工作流部署

Rockytkg edited this page Dec 16, 2024 · 6 revisions

GitHub 部署 AutoMoGuDingCheckIn 项目指南

本指南将帮助您在 GitHub 上部署 AutoMoGuDingCheckIn 项目。请按照以下步骤操作:

步骤 1:start关注 并 Fork 仓库

  1. 访问 AutoMoGuDingCheckIn GitHub 仓库
  2. 点击右上角的 star 按钮收藏仓库,watch按钮关注更新,最后点击 fork, 将仓库复制到您的 GitHub 账户中。 image

步骤 2:修改 JSON 配置文件

  1. 根据您的需求,参考下方示例配置 以及 README.md 还有 Wiki 对于配置说明的页面,修改 JSON 配置文件,确保所有信息正确无误。
  2. 复制修改后的 JSON 配置内容(注意不要提交更改,否则会造成个人信息泄露!!!)。

步骤 3:添加 Secrets

  1. 依次进入克隆后的仓库页面上方的:

    • SettingsActions secrets and variablesActions image
  2. 点击 New repository secret

    • Name 输入框中填写 USER
    • Secret 输入框中输入 [] 并在 输入的中括号中 粘贴刚刚复制的 JSON 配置(如果有多个用户,注意在配置一末尾添加 , 始终在中括号内)。 image image 多用户示例配置
[
  {
    "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}"
    }
  }
]

步骤 4:启动工作流

  1. 回到仓库左上角的 Actions 标签,点击左侧的 打卡 工作流。
  2. 点击右侧的 Run workflow 按钮。
  3. 再次点击绿色的 Run workflow 按钮即可开始定时任务。

image

注意事项

  • 如果您是新用户,进入 Actions 后,点击页面黄色块里的按钮开启功能再继续。

  • 到这里,您应该能收到手机上的通知。如果配置了推送但未收到通知,请查看工作流日志,确认运行成功。

  • 默认情况下,设置了8、9、17、18 点 打卡\检查 打卡状态防止漏打,如果要修改打卡时间,请按照配置修改。

image

结束语

恭喜您成功部署了 AutoMoGuDingCheckIn 项目!如果在过程中遇到任何问题,请随时通过提交 issue 与我们联系。

Clone this wiki locally