Skip to content

Commit d61d6b8

Browse files
Add WakaTime configuration to workflow
Added a new "Configure WakaTime" step that: 1. Checks for WAKE_TIME_API_KEY environment variable (optional) 2. Installs WakaTime CLI (pip install wakatime) 3. Creates ~/.wakatime.cfg with the API key 4. Installs claude-code-wakatime plugin via marketplace Configuration: Add WAKE_TIME_API_KEY to repository secrets to enable WakaTime tracking. Co-Authored-By: Claude (mimo-v2-flash) <noreply@anthropic.com>
1 parent 2a71b7d commit d61d6b8

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/llm-bot-runner.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,42 @@ jobs:
134134
env:
135135
CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY }}
136136

137+
- name: Configure WakaTime
138+
run: |
139+
echo "检查 WakaTime 配置..."
140+
141+
# 检查 WAKE_TIME_API_KEY 环境变量
142+
if [ -z "$WAKE_TIME_API_KEY" ]; then
143+
echo "警告: WAKE_TIME_API_KEY 未设置,跳过 WakaTime 配置"
144+
exit 0
145+
fi
146+
147+
echo "WAKE_TIME_API_KEY 已设置,开始配置 WakaTime..."
148+
149+
# 安装 WakaTime CLI
150+
echo "安装 WakaTime CLI..."
151+
pip install wakatime
152+
153+
# 创建 ~/.wakatime.cfg 配置文件
154+
echo "创建 ~/.wakatime.cfg 配置文件..."
155+
mkdir -p ~
156+
cat > ~/.wakatime.cfg << CFGEOF
157+
[settings]
158+
api_key = $WAKE_TIME_API_KEY
159+
CFGEOF
160+
161+
echo "WakaTime 配置文件已创建:"
162+
cat ~/.wakatime.cfg
163+
164+
# 安装 claude-code-wakatime 插件
165+
echo "安装 claude-code-wakatime 插件..."
166+
claude plugin marketplace add https://github.com/wakatime/claude-code-wakatime.git
167+
claude plugin i claude-code-wakatime@wakatime
168+
169+
echo "WakaTime 配置完成"
170+
env:
171+
WAKE_TIME_API_KEY: ${{ secrets.WAKE_TIME_API_KEY }}
172+
137173
- name: Pre-configure Git
138174
run: |
139175
echo "配置Git用户信息..."

0 commit comments

Comments
 (0)