修复Code Review反馈: 除零检查+任务ID时间戳化+部署指南私有仓库提示
Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/fcc32ea2-c4e3-4d50-8e30-b7c617c2926f Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
parent
1b8f4085a4
commit
29f8002fe0
|
|
@ -54,7 +54,7 @@ jobs:
|
|||
id: task_id
|
||||
run: |
|
||||
DATE=$(TZ='Asia/Shanghai' date +%Y%m%d)
|
||||
SEQ=$(printf '%03d' $((RANDOM % 999 + 1)))
|
||||
SEQ=$(TZ='Asia/Shanghai' date +%H%M%S)
|
||||
echo "id=TASK-${DATE}-${SEQ}" >> $GITHUB_OUTPUT
|
||||
echo "date=${DATE}" >> $GITHUB_OUTPUT
|
||||
|
||||
|
|
|
|||
|
|
@ -435,7 +435,10 @@ jobs:
|
|||
key: ${{ secrets.QQ_SVR_SV_KEY }}
|
||||
script: |
|
||||
cd /opt/qiuqiu/app
|
||||
git pull origin main 2>/dev/null || git clone https://github.com/zhizhi200271/guanghu-zhizhi.git .
|
||||
# 如果仓库是私有的,使用token认证
|
||||
git pull origin main 2>/dev/null || \
|
||||
git clone https://github.com/zhizhi200271/guanghu-zhizhi.git . 2>/dev/null || \
|
||||
echo "⚠️ 如果仓库是私有的,请在服务器配置git credential或使用SSH clone"
|
||||
npm install --production
|
||||
|
||||
# 写入环境变量
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ function step(opts) {
|
|||
|
||||
task.steps.push(newStep);
|
||||
task.progress.total_steps = task.steps.length;
|
||||
task.progress.percentage = `${Math.round((task.progress.completed_steps / task.progress.total_steps) * 100)}%`;
|
||||
task.progress.percentage = task.progress.total_steps > 0 ? `${Math.round((task.progress.completed_steps / task.progress.total_steps) * 100)}%` : '0%';
|
||||
task.progress.last_activity = now;
|
||||
task.last_updated = now;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue