mirror of
https://github.com/hex-ci/smzdm_script.git
synced 2026-02-03 02:24:41 +08:00
restructure the folder
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Docker image release
|
||||
name: Build image
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
context: app
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386
|
||||
push: true
|
||||
tags: ${{ steps.string.outputs.lowercase }}:latest
|
||||
@@ -1,9 +1,9 @@
|
||||
name: SMZDM Check-in Docker Bot
|
||||
name: Check in
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_run:
|
||||
workflows: ["Docker image release"]
|
||||
workflows: ["Build image"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
12
README.md
12
README.md
@@ -24,7 +24,7 @@
|
||||
**务必自行更改为随机时间**
|
||||
|
||||
1. Fork[此仓库项目](https://github.com/Chasing66/smzdm_bot)>, 欢迎`star`~
|
||||
2. 修改 `.github/workflows/docker-run.yml`里的下面部分, 取消`schedule`两行的注释,自行设定时间
|
||||
2. 修改 `.github/workflows/checkin.yml`里的下面部分, 取消`schedule`两行的注释,自行设定时间
|
||||
|
||||
```yaml
|
||||
# UTC时间,对应Beijing时间 9:30
|
||||
@@ -40,7 +40,15 @@ schedule:
|
||||
|
||||
### 2.2 本地运行
|
||||
|
||||
复制`config/config_example.toml`为`config/config.toml`,并按照需求配置
|
||||
复制`app/config/config_example.toml`为`app/config/config.toml`,并按照需求配置
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
cd app
|
||||
pip install -r requirements.txt
|
||||
python main.py
|
||||
```
|
||||
|
||||
### 2.3 本地 docker 运行
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ def main():
|
||||
if Path.exists(Path(CONFIG_PATH, "config.toml")):
|
||||
logger.info("Get configration from config.toml")
|
||||
conf_kwargs = TomlHelper(Path(CONFIG_PATH, "config.toml")).read()
|
||||
elif os.environ.get("ANDROID_COOKIES", None):
|
||||
elif os.environ.get("ANDROID_COOKIE", None):
|
||||
logger.info("Get configration from env")
|
||||
conf_kwargs = {
|
||||
"USER_AGENT": os.environ.get("USER_AGENT"),
|
||||
Reference in New Issue
Block a user