diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index acb2645..00793cf 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -70,6 +70,7 @@ jobs: docker stop ci-test || true docker rm ci-test || true docker run -d --name ci-test \ + --network host \ -e APP_ENV=ci \ -e APP_VERSION=ci-${{ gitea.sha }} \ -e BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ @@ -77,9 +78,8 @@ jobs: -e GIT_BRANCH=${{ gitea.ref_name }} \ -e DEPLOY_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ ci-image:latest - CI_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ci-test) for i in $(seq 1 12); do - if curl -sf http://$CI_IP/health > /dev/null 2>&1; then + if curl -sf http://localhost:80/health > /dev/null 2>&1; then echo "::notice::Health check passed" docker logs ci-test 2>&1 || true docker stop ci-test