Skip to content

Commit 01e23d9

Browse files
committed
docs: update
1 parent 600af66 commit 01e23d9

1 file changed

Lines changed: 62 additions & 24 deletions

File tree

README.md

Lines changed: 62 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Daily Actions
1+
# Cloud Checkin
22

33
<div align="center">
44
<picture>
5-
<img src="https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-05-25-14-57-31.png" alt="workflow" width="500" height="300"/>
5+
<img src="https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-05-29-12-15-02.png" alt="workflow" width="500" height="300"/>
66
</picture>
77

8-
本仓库采用 GitHub Action 实现每日签到以及自动答题等任务功能。
8+
本仓库采用 CI/CD 实现每日签到以及自动答题等任务功能。
99

1010
[English Version](./README-en.md) |
1111
中文版本
@@ -15,7 +15,7 @@
1515

1616
> 欢迎 :star:,添加更多平台欢迎 issue 或者 PR。
1717
18-
每天自动完成平台任务,完成以后会通过 telegram 机器人通知,如果失败则会直接通过 Github 发送邮件通知。
18+
每天自动完成平台任务,完成以后会通过 telegram 机器人通知,如果失败则会直接通过 CircleCI 发送邮件通知。
1919

2020
- **Nodeseek**
2121
- 自动签到
@@ -27,46 +27,84 @@
2727

2828
## 快速开始
2929

30-
Fork 本仓库到你自己的仓库,然后添加对应的配置项到仓库的 secrets 中(在 settings -> secrets and variables -> actions -> new repository secret)。然后等待工作流自动运行即可,非常简单无需别的操作
30+
Fork 本仓库到你自己的仓库,然后添加对应的配置项到仓库的 secrets 中(在 `settings -> secrets and variables -> actions -> new repository secret`
3131

32-
> 如果不需要某个平台,可以直接删除 `.github/workflows` 目录下该平台对应的 workflow 文件即可。
32+
### 注册 [CircleCI](https://circleci.com/)
3333

34-
### 配置 Telegram 通知
34+
[CircleCI](https://circleci.com/) 是一个优秀的 CI/CD 平台,Free plan 的 `30,000 credits/mo, that’s up to 6,000 build mins` 完全可以支撑起本项目的所有需求。
35+
36+
详细的注册教程请见 [CloudCheckin Wiki](https://github.com/timerring/CloudCheckin/wiki/CircleCI-Registeration)
37+
38+
### 申请 CircleCI Token
39+
40+
[CircleCI](https://app.circleci.com/settings/user/tokens) 页面申请 Token 即可,并且添加到仓库的 secrets 中,命名为 `CIRCLECI_TOKEN`
41+
42+
### 复制 Orgid
43+
44+
请在你创建的 Organization Settings 里找到 Organization ID,并且添加到仓库的 secrets 中,命名为 `CIRCLECI_ORG_ID`
45+
46+
![](https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-05-30-13-25-46.png)
47+
48+
### 设置任务定时
49+
50+
可以自行修改 `config.yml` 设置任务定时,注意执行时间固定为 UTC 时区,北京时间为 UTC+8 时区,请自行转换时差。
51+
52+
https://github.com/timerring/CloudCheckin/blob/600af66568069ad14b6e5cff7cbfed99fc236fd0/.circleci/config.yml#L54
53+
54+
### 配置平台
55+
56+
> 如果不需要某个平台,可以直接编辑删除 `.circleci/config.yml` 目录下该平台对应的项即可,例如无需一亩三分地,可以考虑删除 64-65, 74-75 行。
57+
58+
#### 配置 Telegram 通知
3559

3660
1. 按照 [telegram bot](https://core.telegram.org/bots/features#botfather) 的说明创建一个 telegram 机器人并获取 `token`
37-
2. 将机器人添加到您的联系人并发送一条消息。然后访问 https://api.telegram.org/bot{TELEGRAM_TOKEN}/getUpdates 获取 `chat id`(将 `{TELEGRAM_TOKEN}` 替换为步骤1中获得的 token)
38-
3.`token``chat id` 添加到仓库密钥中,分别命名为 `TELEGRAM_TOKEN``TELEGRAM_CHAT_ID`(在 settings -> secrets and variables -> actions -> new repository secret)
61+
2. 将机器人添加为您的联系人并发送一条消息。然后访问 https://api.telegram.org/bot{TELEGRAM_TOKEN}/getUpdates 获取 `chat id`(将 `{TELEGRAM_TOKEN}` 替换为步骤1中获得的 token)
62+
3.`token``chat id` 添加到仓库密钥中,分别命名为 `TELEGRAM_TOKEN``TELEGRAM_CHAT_ID`
3963

40-
### 配置 Nodeseek 签到
64+
#### 配置签到平台
65+
66+
<details>
67+
<summary>配置 Nodeseek 签到</summary>
4168

4269
1. 从 Nodeseek 网站获取 `cookie`(获取方法请参考 [COOKIE 获取教程](https://blog.timerring.com/posts/the-way-to-get-cookie/)
43-
2.`cookie` 添加到仓库密钥中,命名为 `NODESEEK_COOKIE`(在 settings -> secrets and variables -> actions -> new repository secret)
70+
2.`cookie` 添加到仓库密钥中,命名为 `NODESEEK_COOKIE`
71+
</details>
72+
4473

45-
### 配置 V2EX 签到
74+
<details>
75+
<summary>配置 V2EX 签到</summary>
4676

4777
1. 从 V2EX 网站获取 `cookie`(获取方法请参考 [COOKIE 获取教程](https://blog.timerring.com/posts/the-way-to-get-cookie/)
48-
2.`cookie` 添加到仓库密钥中,命名为 `V2EX_COOKIE`(在 settings -> secrets and variables -> actions -> new repository secret)
78+
2. 注意,由于 V2EX 的 cookie 包含 `"` 以及 `$` 特殊字符,可能会导致 sh 中传递失败,因此需要转义这两个特殊字符,简单脚本为 `echo 'cookie' | sed 's/["$]/\\&/g'`
79+
3. 将转义后的 `cookie` 添加到仓库密钥中,命名为 `V2EX_COOKIE`
80+
</details>
4981

50-
### 配置 一亩三分地 签到
82+
<details>
83+
<summary>配置 一亩三分地 签到及答题</summary>
5184

5285
1. 从 一亩三分地 网站获取 `cookie`(获取方法请参考 [COOKIE 获取教程](https://blog.timerring.com/posts/the-way-to-get-cookie/)
53-
2.`cookie` 添加到仓库密钥中,命名为 `ONEPOINT3ACRES_COOKIE`(在 settings -> secrets and variables -> actions -> new repository secret)
54-
3.[2captcha](https://2captcha.com/) 充值获取 `api key`,(由于一亩三分地的签到以及答题需要通过 cloudflare turnsite 的验证,因此这里通过 2captcha 的 api 来解决验证问题)
86+
2.`cookie` 添加到仓库密钥中,命名为 `ONEPOINT3ACRES_COOKIE`
87+
3.[2captcha](https://2captcha.com/) 充值获取 `api key`,(由于一亩三分地的签到以及答题需要通过 Cloudflare Turnstile 的验证,因此这里通过 2captcha 的 api 来解决验证问题)
5588
- 注意: 2captcha 的 api 需要付费,3 美元起充,支持支付宝。每次成功通过验证约 0.00145 美元,3 美元能用 2068 次,约 2.83 年。
56-
4.`api key` 添加到仓库密钥中,命名为 `TWOCAPTCHA_APIKEY`(在 settings -> secrets and variables -> actions -> new repository secret)
89+
4.`api key` 添加到仓库密钥中,命名为 `TWOCAPTCHA_APIKEY`
90+
</details>
5791

58-
## 工作原理
92+
#### 同步配置
5993

60-
1. GitHub Action 工作流会在每天北京时间 09:00(UTC 时间 01:00)左右运行
61-
2. 如果成功,工作流会通过 Telegram 机器人发送通知
62-
3. 如果失败,工作流也会通过 Telegram 机器人发送通知,并以非零退出码退出,这可以让 GitHub 发送邮件提醒通知
94+
配置完成所有内容后,请手动执行一次 `Setup CircleCI Context and Secrets` workflow 确保配置 secrets 通过 CircleCI CLI 正确同步至 CircleCI contexts secrets。(Actions -> `Setup CircleCI Context and Secrets` -> `Run workflow`
6395

64-
## 手动触发
96+
## 常见问题
6597

66-
您也可以通过 GitHub 仓库的 Actions 标签页手动触发工作流,直接 run workflow 即可。
98+
1. 为什么要采用 CircleCI,不直接用 Github Actions?
99+
100+
直接用 Github Actions 容易导致潜在的仓库被封风险,尽管本项目一天只触发一次请求不像 upptime 等开源项目有超高的并发请求量,但是本着本分的原则,还是不要给 Github 添加过多负担。CircleCI 同样是优秀的 CI/CD 平台,Free plan 的 30,000 credits/mo, that’s up to 6,000 build mins 完全可以支撑起本项目的所有需求,另外 CircleCI 的不同 Project 间的 contexts 设计思想相较于一般的 CI/CD 有很大程度上的创新,更多用户使用并且熟悉 CircleCI,对于用户以及平台来说都是双方受益的。
67101

68-
## 参考
102+
2. 为什么不采用 Cloudflare Worker 等 Serverless 函数计算?
103+
104+
已经尝试过 Cloudflare Worker,本地 wrangler dev 有效,但是 deploy Cloudflare Worker 之后,由于 Cloudflare edge 请求会带有明显的 cf 标志,很多平台已经限制了 Cloudflare Worker 的请求。至于更多的函数计算平台还在尝试中,有进展会同步在 Repo 里。
69105

106+
## 参考
107+
- [2captcha](https://github.com/2captcha/2captcha-python)
70108
- [1point3acres](https://github.com/harryhare/1point3acres)
71109
- [V2EX](https://github.com/CruiseTian/action-hub)
72110
- [nodeseek](https://github.com/xinycai/nodeseek_signin)

0 commit comments

Comments
 (0)