diff --git a/.gitea/workflows/_diag.yml b/.gitea/workflows/_diag.yml index 641752d..2e03370 100644 --- a/.gitea/workflows/_diag.yml +++ b/.gitea/workflows/_diag.yml @@ -5,19 +5,16 @@ jobs: diag: runs-on: ubuntu-latest steps: - - name: env and dns probe + - name: candidate addresses probe shell: bash run: | - echo "RESULTS_URL=${ACTIONS_RESULTS_URL:-}" - echo "RUNTIME_URL=${ACTIONS_RUNTIME_URL:-}" - echo "CACHE_URL=${ACTIONS_CACHE_URL:-}" - echo "RUNNER_VERSION=${GITEA_ACTIONS_RUNNER_VERSION:-}" - echo "HTTP_PROXY=${HTTP_PROXY:-} HTTPS_PROXY=${HTTPS_PROXY:-} NO_PROXY=${NO_PROXY:-}" - echo "---- /etc/hosts"; cat /etc/hosts - echo "---- /etc/resolv.conf"; cat /etc/resolv.conf - for u in "$ACTIONS_RESULTS_URL" "$ACTIONS_RUNTIME_URL"; do + echo "== resolv.conf"; cat /etc/resolv.conf + for u in https://gitea.naeeo.com/ http://10.0.0.250:39630/ http://gitea:3000/; do h=$(echo "$u" | sed -E 's#^[a-zA-Z]+://##; s#[/:].*$##') - echo "==== probe host: $h (from $u)" - getent hosts "$h" || echo "getent FAILED" - curl -sS -m 8 -o /dev/null -w "http_code=%{http_code} time=%{time_total}\n" "$u" || echo "curl FAILED rc=$?" + echo "==== $u (host=$h)" + getent hosts "$h" || echo "DNS FAIL" + curl -sS -m 10 -o /dev/null -w " http_code=%{http_code} time=%{time_total} remote=%{remote_ip}\n" "$u" || echo " CURL FAIL rc=$?" done + echo "==== api checks" + curl -sS -m 10 -o /dev/null -w "public api: %{http_code}\n" https://gitea.naeeo.com/api/v1/version + curl -sS -m 10 -o /dev/null -w "lan api: %{http_code}\n" http://10.0.0.250:39630/api/v1/version