restructure the folder

This commit is contained in:
LuckyHunter
2023-02-18 23:51:30 +08:00
parent 6c971ccb49
commit 5efe1ea0b6
11 changed files with 15 additions and 7 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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时间 930
@@ -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 运行

View File

@@ -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"),