49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: "📰 铸渊 · 光湖开发日报"
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 2 * * *' # UTC 02:00 = 北京时间 10:00
|
|
workflow_dispatch: # 支持手动触发
|
|
|
|
permissions:
|
|
contents: write
|
|
discussions: write
|
|
|
|
jobs:
|
|
daily-report:
|
|
name: 生成并发布开发日报
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 50 # 获取最近提交用于日报亮点
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
# ── 生成并发布日报 ──
|
|
- name: 生成开发日报
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
DISCUSSION_CATEGORY: "Announcements"
|
|
run: node scripts/generate-daily-report.js
|
|
|
|
# ── 提交日报存档 ──
|
|
- name: 提交日报存档
|
|
run: |
|
|
git config user.name "铸渊 (ZhùYuān)"
|
|
git config user.email "zhuyuan@guanghulab.com"
|
|
git add docs/daily-reports/
|
|
if git diff --cached --quiet; then
|
|
echo "📌 无日报文件需要提交"
|
|
else
|
|
git commit -m "📰 光湖开发日报 · $(TZ='Asia/Shanghai' date '+%Y-%m-%d') [skip ci]"
|
|
git push
|
|
echo "✅ 日报存档已提交"
|
|
fi
|