删除 git actions 的相关配置
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
# 企微群机器人 webhook(早报推送,与 bot API 模式凭证不同)
|
# 企微群机器人 webhook(早报推送,与 bot API 模式凭证不同)
|
||||||
WECOM_WEBHOOK_KEY=your-webhook-key
|
WECOM_WEBHOOK_KEY=your-webhook-key
|
||||||
|
|
||||||
# GitHub Actions:将上述 key 与下方可选项写入 repo Secrets / Variables
|
|
||||||
# 详见 README「部署(GitHub Actions / Docker)」
|
|
||||||
|
|
||||||
# 早报内容
|
# 早报内容
|
||||||
DAILY_TRENDING_LIMIT=150
|
DAILY_TRENDING_LIMIT=150
|
||||||
DAILY_HOT_LIMIT=150
|
DAILY_HOT_LIMIT=150
|
||||||
|
|||||||
64
.github/workflows/daily.yml
vendored
64
.github/workflows/daily.yml
vendored
@@ -1,64 +0,0 @@
|
|||||||
name: daily
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
# 08:30 CST (UTC+8) = 00:30 UTC
|
|
||||||
- cron: "30 0 * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
skip_push:
|
|
||||||
description: Skip WeCom push (generate only)
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: daily-report
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
report:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 30
|
|
||||||
env:
|
|
||||||
TZ: Asia/Shanghai
|
|
||||||
WECOM_WEBHOOK_KEY: ${{ secrets.WECOM_WEBHOOK_KEY }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_PAT || github.token }}
|
|
||||||
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
|
|
||||||
DAILY_LLM_API_KEY: ${{ secrets.DAILY_LLM_API_KEY }}
|
|
||||||
DAILY_LLM_API_BASE: ${{ vars.DAILY_LLM_API_BASE }}
|
|
||||||
DAILY_LLM_MODEL: ${{ vars.DAILY_LLM_MODEL }}
|
|
||||||
DAILY_REPORT_MODE: ${{ vars.DAILY_REPORT_MODE }}
|
|
||||||
CURSOR_MODEL: ${{ vars.CURSOR_MODEL }}
|
|
||||||
DAILY_AI_NEWS: ${{ vars.DAILY_AI_NEWS }}
|
|
||||||
DAILY_CN_AI_NEWS: ${{ vars.DAILY_CN_AI_NEWS }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
cache: pip
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Generate and push daily report
|
|
||||||
run: |
|
|
||||||
ARGS=()
|
|
||||||
if [ "${{ inputs.skip_push }}" = "true" ]; then
|
|
||||||
ARGS+=(--skip-push)
|
|
||||||
fi
|
|
||||||
chmod +x ./run-daily.sh
|
|
||||||
./run-daily.sh --force "${ARGS[@]}"
|
|
||||||
|
|
||||||
- name: Upload report artifacts
|
|
||||||
if: always()
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: daily-report-${{ github.run_id }}
|
|
||||||
path: |
|
|
||||||
output/*.md
|
|
||||||
output/*.json
|
|
||||||
if-no-files-found: ignore
|
|
||||||
retention-days: 14
|
|
||||||
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pytest:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
cache: pip
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install -r requirements-dev.txt
|
|
||||||
- name: Run tests
|
|
||||||
run: pytest -q
|
|
||||||
25
README.md
25
README.md
@@ -36,7 +36,7 @@
|
|||||||
python -m daily push output\2026-07-03.wecom.md # 只推送
|
python -m daily push output\2026-07-03.wecom.md # 只推送
|
||||||
```
|
```
|
||||||
|
|
||||||
Linux / macOS / CI 等价脚本:
|
Linux / macOS 等价脚本:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chmod +x run-daily.sh
|
chmod +x run-daily.sh
|
||||||
@@ -49,28 +49,7 @@ chmod +x run-daily.sh
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 部署(GitHub Actions / Docker)
|
## 部署(Docker)
|
||||||
|
|
||||||
### GitHub Actions(零服务器定时推送)
|
|
||||||
|
|
||||||
仓库已包含 [`.github/workflows/daily.yml`](.github/workflows/daily.yml),默认每天 **08:30(北京时间)** 生成并推送。
|
|
||||||
|
|
||||||
1. Fork 或启用本仓库的 Actions
|
|
||||||
2. **Settings → Secrets and variables → Actions** 添加 Secrets:
|
|
||||||
|
|
||||||
| Secret | 必需 | 说明 |
|
|
||||||
|--------|------|------|
|
|
||||||
| `WECOM_WEBHOOK_KEY` | 是 | 企微群机器人 webhook key |
|
|
||||||
| `GH_PAT` | 否 | 个人 GitHub PAT(提高 API 限额;不设则用 Actions 内置 token) |
|
|
||||||
| `CURSOR_API_KEY` | 否 | Agent 模式(Cursor SDK) |
|
|
||||||
| `DAILY_LLM_API_KEY` | 否 | Agent / 编辑层(OpenAI 兼容 API) |
|
|
||||||
|
|
||||||
3. 可选 **Variables**(不设则用代码默认值):`DAILY_REPORT_MODE`、`DAILY_LLM_MODEL`、`DAILY_AI_NEWS` 等
|
|
||||||
4. **Actions → daily → Run workflow** 可手动触发;勾选 *Skip WeCom push* 则只生成不上报
|
|
||||||
|
|
||||||
运行产物可在 workflow 的 **Artifacts** 中下载(`.md` / `.json`,保留 14 天)。
|
|
||||||
|
|
||||||
### Docker
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp .env.example .env # 填入 WECOM_WEBHOOK_KEY 等
|
cp .env.example .env # 填入 WECOM_WEBHOOK_KEY 等
|
||||||
|
|||||||
Reference in New Issue
Block a user