修复 HK-1 Actions 容器网络
All checks were successful
Java Maven 3.9.9 & JDK 26 CI/CD Pipeline / build-and-deploy (push) Successful in 8m6s

This commit is contained in:
Lee 2026-08-19 18:04:33 +08:00
parent 4bff3b8a2f
commit a6f5ea721d
2 changed files with 5 additions and 4 deletions

View File

@ -23,7 +23,7 @@ jobs:
# 清空当前工作目录,防止历史残留
rm -rf ./*
# 利用 Gitea 自动注入的内置变量,动态克隆当前仓库、当前分支、当前提交
git clone --depth 1 -b ${{ gitea.ref_name }} http://172.17.0.1:3000/${{ gitea.repository }} .
git clone --depth 1 -b ${{ gitea.ref_name }} http://gitea:3000/${{ gitea.repository }} .
git checkout ${{ gitea.sha }}
- name: 2. 触发 Docker 容器内编译与镜像打包
@ -62,7 +62,7 @@ jobs:
# 循环探活:每隔 5 秒检测一次,最多尝试 15 次(总计 75 秒,给高版本 JVM 充足的预热时间)
for i in 1 2 3 4 5 6; do
# 发送轻量级请求只要服务响应了无论是200还是Spring默认的404/无路由),都证明 Tomcat/Netty 已拉起
if wget -q --spider http://172.17.0.1:${APP_PORT}/; then
if wget -q --spider http://${CONTAINER_NAME}:${APP_PORT}/; then
echo "✅ [SUCCESS] 探活成功Java 26 服务已成功拉起。"
echo "🧹 开始安全地清理历史无用镜像及过期构建缓存..."
docker image prune -f

View File

@ -16,10 +16,11 @@ cache:
enabled: false
container:
network: bridge
network: tracecd-net
privileged: false
options: "-v /opt/tracecd/app.env:/opt/tracecd/app.env:ro"
valid_volumes: []
valid_volumes:
- /opt/tracecd/app.env
docker_host: ""
force_pull: false
force_rebuild: false