push to gitea

This commit is contained in:
2025-12-23 14:25:35 +08:00
parent aa4bef9940
commit e59aa55a47
+45
View File
@@ -0,0 +1,45 @@
#!/bin/bash
# 监控 Gitea Actions workflow 执行状态
GITEA_URL="http://192.168.1.83:33000"
REPO="gao/ljwx-health"
echo "========================================="
echo "Gitea Actions 监控"
echo "========================================="
echo ""
# 检查 runner 状态
echo "📊 Runner 状态:"
ps aux | grep act_runner | grep -v grep | wc -l | xargs echo "运行中的 runner 数量:"
echo ""
# 检查最近的 git 提交
echo "📝 最近的提交:"
git log --oneline -3
echo ""
# 检查 runner 日志
echo "📋 Runner 日志 (最近 10 行):"
tail -10 ~/gitea-runners/runner1/runner.log 2>/dev/null || echo "无日志"
echo ""
# 提示访问 Web UI
echo "🌐 请访问以下 URL 查看 Actions 执行状态:"
echo " ${GITEA_URL}/${REPO}/actions"
echo ""
# 检查 K8s 状态(如果可用)
echo "☸️ K8s 集群状态:"
if command -v kubectl &> /dev/null; then
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
kubectl get pods -n ljwx-health 2>/dev/null || echo "K3s 未运行或无法访问"
else
echo "kubectl 未安装"
fi
echo ""
echo "========================================="
echo "提示: 运行 'watch -n 5 ./monitor-gitea-workflow.sh' 持续监控"
echo "========================================="