diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index daaef0f..acb2645 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -76,11 +76,10 @@ jobs: -e GIT_COMMIT=${{ gitea.sha }} \ -e GIT_BRANCH=${{ gitea.ref_name }} \ -e DEPLOY_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ - -p 8080:80 \ 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://localhost:8080/health > /dev/null 2>&1; then + if curl -sf http://$CI_IP/health > /dev/null 2>&1; then echo "::notice::Health check passed" docker logs ci-test 2>&1 || true docker stop ci-test @@ -89,13 +88,12 @@ jobs: fi sleep 5 done - echo "::error::Health check failed after 60 seconds" docker logs ci-test 2>&1 || true docker stop ci-test docker rm ci-test exit 1 - + - name: Move cache run: | set -euo pipefail