forked from duanyytop/agents-radar
-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (62 loc) · 2 KB
/
monthly-digest.yml
File metadata and controls
74 lines (62 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Monthly Agents Radar
on:
schedule:
# 每月1日 02:00 UTC = 10:00 CST,日报运行后2小时
- cron: "0 2 1 * *"
workflow_dispatch:
permissions:
contents: write
issues: write
jobs:
monthly:
if: github.repository == 'duanyytop/agents-radar'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run monthly rollup
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
DIGEST_REPO: ${{ github.repository }}
run: pnpm monthly
- name: Commit monthly report
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add digests/
if git diff --cached --quiet; then
echo "No monthly report to commit"
else
MONTH=$(date -u +%Y-%m)
git commit -m "digest: ${MONTH} monthly digest"
git pull --rebase
git push
fi
- name: Update web manifest
run: pnpm manifest
- name: Commit manifest and feed
run: |
git add manifest.json feed.xml
if ! git diff --cached --quiet; then
git commit -m "chore: update manifest.json"
git pull --rebase
git push
fi
- name: Send Telegram notification
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID || '@agents_radar' }}
PAGES_URL: https://duanyytop.github.io/agents-radar
run: pnpm notify