Skip to content

Commit 864654f

Browse files
committed
docs: update docs
1 parent 0b71925 commit 864654f

2 files changed

Lines changed: 48 additions & 20 deletions

File tree

README-en.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
# Daily Actions
2-
1+
# CloudCheckin
32

43
<div align="center">
54
<picture>
6-
<img src="https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-05-29-12-15-02.png" alt="workflow" width="500" height="300"/>
5+
<img src="https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-06-01-17-47-19.png" alt="workflow" width="200" height="100"/>
76
</picture>
87

9-
This repository uses CI/CD to automate daily check-ins and automated question answering tasks.
8+
Multi-platform automatic check-in and quiz automation based on CI/CD and Cloudflare Workers.
109

1110
English Version |
1211
[中文版本](./README.md)
1312
</div>
1413

1514
## Features
16-
1715
> Welcome to :star: this project. Feel free to submit issues or PRs to add more platforms.
1816
1917
Automatically complete platform tasks daily. After completion, notifications will be sent via Telegram bot. If tasks fail, email notifications will be sent directly through CircleCI.
@@ -22,9 +20,13 @@ Automatically complete platform tasks daily. After completion, notifications wil
2220
- Automatic check-in
2321
- **V2EX**
2422
- Automatic check-in
25-
- **1point3acres**
23+
- **1Point3Acres**
2624
- Automatic check-in
27-
- Automatic question answering
25+
- Automatic quiz completion
26+
27+
## Architecture
28+
29+
![](https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-06-01-17-53-56.png)
2830

2931
## Quick Start
3032

@@ -36,6 +38,9 @@ Fork this repository to your own account, then add the corresponding configurati
3638

3739
For detailed registration instructions, please see [CloudCheckin Wiki](https://github.com/timerring/CloudCheckin/wiki/CircleCI-Registeration).
3840

41+
> [!IMPORTANT]
42+
> **Note: After completing the trigger `CIRCLECI_WEBHOOK_URL` concatenation, fill it in the GitHub Actions secrets**.
43+
3944
### Apply for CircleCI Token
4045

4146
Apply for a Token on the [CircleCI](https://app.circleci.com/settings/user/tokens) page and add it to your repository secrets with the name `CIRCLECI_TOKEN`.
@@ -46,15 +51,20 @@ Find the Organization ID in your created Organization Settings and add it to you
4651

4752
![](https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-05-30-13-25-46.png)
4853

54+
### Configure Cloudflare Worker
55+
56+
1. Log in to your [Cloudflare](https://dash.cloudflare.com/login) account, [create a token on the `Profile` page](https://dash.cloudflare.com/profile/api-tokens) using `Create Token` (recommend using the `Edit Cloudflare Workers` template with default settings).
57+
2. Add this Token to your repository secrets with the name `CLOUDFLARE_API_TOKEN`.
58+
4959
### Set Task Schedule
5060

51-
You can modify `config.yml` to set task schedules. Note that execution time is fixed to UTC timezone. Beijing time is UTC+8, so please convert the time difference accordingly.
61+
You can modify the cron field in `wrangler.toml` to set task schedules. Note that execution time is fixed to UTC timezone. Beijing time is UTC+8, so please convert the time difference accordingly.
5262

53-
https://github.com/timerring/CloudCheckin/blob/600af66568069ad14b6e5cff7cbfed99fc236fd0/.circleci/config.yml#L54
63+
https://github.com/timerring/CloudCheckin/blob/0b719258ab4f5f746b067798eb2a4185a71631f7/wrangler.toml#L6
5464

5565
### Configure Platforms
5666

57-
> If you don't need a certain platform, you can directly edit and delete the corresponding items in `.circleci/config.yml`. For example, if you don't need 1Point3Acres, consider deleting lines 64-65 and 74-75.
67+
> If you don't need a certain platform, you can directly edit and delete the corresponding items in `.circleci/config.yml`. For example, if you don't need 1Point3Acres, consider deleting lines 57-58.
5868
5969
#### Configure Telegram Notifications
6070

@@ -94,7 +104,7 @@ https://github.com/timerring/CloudCheckin/blob/600af66568069ad14b6e5cff7cbfed99f
94104

95105
#### Sync Configuration
96106

97-
After configuring all content, please manually execute the `Setup CircleCI Context and Secrets` workflow once to ensure that configuration secrets are correctly synchronized to CircleCI contexts secrets through CircleCI CLI. (Actions -> `Setup CircleCI Context and Secrets` -> `Run workflow`)
107+
After configuring all content, please manually execute the `Setup CircleCI Context and Secrets` and `Deploy Cloudflare Worker` workflows once to ensure that configuration secrets are correctly synchronized to CircleCI contexts secrets through CircleCI CLI, and that the Cloudflare Worker is properly deployed. (Actions -> `Setup CircleCI Context and Secrets` -> `Run workflow` and Actions -> `Deploy Cloudflare Worker` -> `Run workflow`)
98108

99109
## FAQ
100110

@@ -104,7 +114,11 @@ After configuring all content, please manually execute the `Setup CircleCI Conte
104114

105115
2. **Why not use Cloudflare Worker or other Serverless computing functions?**
106116

107-
We have tried Cloudflare Worker. Local `wrangler dev` works, but after deploying to Cloudflare Worker, since Cloudflare edge requests carry obvious cf flags, many platforms have restricted Cloudflare Worker requests. We are still trying more function computing platforms, and any progress will be synchronized in the repository. Of course, if you are interested in the Cloudflare Worker approach, you are welcome to continue trying the work. My local debugging demo is already placed in the `cloudflareworkers` directory.
117+
We have tried Cloudflare Worker. Local `wrangler dev` works, but after deploying to Cloudflare Worker, since Cloudflare edge requests carry obvious cf flags, many platforms have restricted Cloudflare Worker requests. We are still trying more function computing platforms, and any progress will be synchronized in the repository. Of course, if you are interested in the Cloudflare Worker approach, you are welcome to continue the work. The demo I debugged locally has been placed in the `cloudflareworkers` directory.
118+
119+
3. **Why switch to Cloudflare Worker as a Webhook trigger instead of using CircleCI's Scheduled?**
120+
121+
According to [CircleCI's latest terms](https://circleci.com/docs/version-control-system-integration-overview/#pipeline-triggers-and-integrations), Scheduled pipelines will not be available for personal repositories under `GitHub App`, so we need to switch to [Custom Webhook](https://circleci.com/docs/custom-webhooks/) format, using Cloudflare Worker as a scheduled trigger. Of course, you can also use [other ways to call Webhook](https://circleci.com/docs/triggers-overview/#trigger-a-pipeline-from-a-custom-webhook), just need to call the Webhook interface regularly. Here I use Cloudflare Worker as the scheduled trigger.
108122

109123
## Contributing
110124

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
# Cloud Checkin
1+
# CloudCheckin
22

33
<div align="center">
44
<picture>
5-
<img src="https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-05-29-12-15-02.png" alt="workflow" width="500" height="300"/>
5+
<img src="https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-06-01-17-47-19.png" alt="workflow" width="200" height="100"/>
66
</picture>
77

8-
本仓库采用 CI/CD 实现每日签到以及自动答题等任务功能
8+
基于 CI/CD 以及 Cloudflare Workers 实现多平台自动签到以及答题
99

1010
[English Version](./README-en.md) |
1111
中文版本
1212
</div>
1313

1414
## 功能
15-
1615
> 欢迎 :star:,添加更多平台欢迎 issue 或者 PR。
1716
1817
每天自动完成平台任务,完成以后会通过 telegram 机器人通知,如果失败则会直接通过 CircleCI 发送邮件通知。
@@ -25,6 +24,10 @@
2524
- 自动签到
2625
- 自动答题
2726

27+
## 架构图
28+
29+
![](https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-06-01-17-53-56.png)
30+
2831
## 快速开始
2932

3033
Fork 本仓库到你自己的仓库,然后添加对应的配置项到仓库的 secrets 中(在 `settings -> secrets and variables -> actions -> new repository secret`)。
@@ -35,6 +38,9 @@ Fork 本仓库到你自己的仓库,然后添加对应的配置项到仓库的
3538

3639
详细的注册教程请见 [CloudCheckin Wiki](https://github.com/timerring/CloudCheckin/wiki/CircleCI-Registeration)
3740

41+
> [!IMPORTANT]
42+
> **注意 trigger 的 `CIRCLECI_WEBHOOK_URL` 拼接完成后填写在 Github Actions 的 secrets 中**
43+
3844
### 申请 CircleCI Token
3945

4046
[CircleCI](https://app.circleci.com/settings/user/tokens) 页面申请 Token 即可,并且添加到仓库的 secrets 中,命名为 `CIRCLECI_TOKEN`
@@ -45,15 +51,20 @@ Fork 本仓库到你自己的仓库,然后添加对应的配置项到仓库的
4551

4652
![](https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-05-30-13-25-46.png)
4753

54+
### 配置 Cloudflare Worker
55+
56+
1. 登录 [Cloudflare](https://dash.cloudflare.com/login) 账号,[`Profile` 页面](https://dash.cloudflare.com/profile/api-tokens) 创建 `Create Token`(建议 `Edit Cloudflare Workers` 模板保持默认就好)。
57+
2. 将该 Token 添加到仓库的 secrets 中,命名为 `CLOUDFLARE_API_TOKEN`
58+
4859
### 设置任务定时
4960

50-
可以自行修改 `config.yml` 设置任务定时,注意执行时间固定为 UTC 时区,北京时间为 UTC+8 时区,请自行转换时差。
61+
可以自行修改 `wrangler.toml` 设置任务定时 cron 字段,注意执行时间固定为 UTC 时区,北京时间为 UTC+8 时区,请自行转换时差。
5162

52-
https://github.com/timerring/CloudCheckin/blob/600af66568069ad14b6e5cff7cbfed99fc236fd0/.circleci/config.yml#L54
63+
https://github.com/timerring/CloudCheckin/blob/0b719258ab4f5f746b067798eb2a4185a71631f7/wrangler.toml#L6
5364

5465
### 配置平台
5566

56-
> 如果不需要某个平台,可以直接编辑删除 `.circleci/config.yml` 目录下该平台对应的项即可,例如无需一亩三分地,可以考虑删除 64-65, 74-75 行。
67+
> 如果不需要某个平台,可以直接编辑删除 `.circleci/config.yml` 目录下该平台对应的项即可,例如无需一亩三分地,可以考虑删除 57-58 行。
5768
5869
#### 配置 Telegram 通知
5970

@@ -91,7 +102,7 @@ https://github.com/timerring/CloudCheckin/blob/600af66568069ad14b6e5cff7cbfed99f
91102

92103
#### 同步配置
93104

94-
配置完成所有内容后,请手动执行一次 `Setup CircleCI Context and Secrets` workflow 确保配置 secrets 通过 CircleCI CLI 正确同步至 CircleCI contexts secrets。(Actions -> `Setup CircleCI Context and Secrets` -> `Run workflow`
105+
配置完成所有内容后,请手动执行一次 `Setup CircleCI Context and Secrets` 以及 `Deploy Cloudflare Worker` workflow 确保配置 secrets 通过 CircleCI CLI 正确同步至 CircleCI contexts secrets,并将 Cloudflare Worker 正确部署。(Actions -> `Setup CircleCI Context and Secrets` -> `Run workflow` 以及 Actions -> `Deploy Cloudflare Worker` -> `Run workflow`
95106

96107
## 常见问题
97108

@@ -103,6 +114,9 @@ https://github.com/timerring/CloudCheckin/blob/600af66568069ad14b6e5cff7cbfed99f
103114

104115
已经尝试过 Cloudflare Worker,本地 wrangler dev 有效,但是 deploy Cloudflare Worker 之后,由于 Cloudflare edge 请求会带有明显的 cf 标志,很多平台已经限制了 Cloudflare Worker 的请求。至于更多的函数计算平台还在尝试中,有进展会同步在 Repo 里。当然,如果你对 Cloudflare Worker 的方式有兴趣,欢迎继续尝试的工作,我本地调试的 demo 已经放置于 `cloudflareworkers` 目录下。
105116

117+
3. 为什么要切换到 Cloudflare Worker 作为 Webhook 触发器,不用 CircleCI 的 Scheduled?
118+
根据 [CircleCI 的最新条款](https://circleci.com/docs/version-control-system-integration-overview/#pipeline-triggers-and-integrations),Scheduled pipelines 将不对 `GitHub App` 下的个人仓库开放,因此需要切换到 [Custom Webhook](https://circleci.com/docs/custom-webhooks/) 的形式,通过 Cloudflare Worker 作为定时触发器,当然你也可以采用[其他方式调用 Webhook](https://circleci.com/docs/triggers-overview/#trigger-a-pipeline-from-a-custom-webhook),只需要定时调用 Webhook 的接口即可,这里我采用了 Cloudflare Worker 作为定时触发器。
119+
106120
## 贡献
107121

108122
欢迎提交你需要的平台,语言不限制。

0 commit comments

Comments
 (0)