From 1c2e105934a16ae557f311b46a4434ec23c255c5 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 31 May 2026 23:50:25 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20add=20uptime=20monitor=20workflow=20?= =?UTF-8?q?=E2=80=94=20checks=20up2cloud.tech=20every=205=20minutes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/uptime-monitor.yml | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/uptime-monitor.yml diff --git a/.github/workflows/uptime-monitor.yml b/.github/workflows/uptime-monitor.yml new file mode 100644 index 0000000..e7a4dfa --- /dev/null +++ b/.github/workflows/uptime-monitor.yml @@ -0,0 +1,38 @@ +name: Uptime Monitor — up2cloud.tech + +on: + schedule: + - cron: "*/5 * * * *" # every 5 minutes + workflow_dispatch: + +jobs: + check: + name: Check up2cloud.tech + runs-on: ubuntu-latest + steps: + - name: DNS check + id: dns + run: | + if host up2cloud.tech 1.1.1.1 >/dev/null 2>&1; then + echo "dns=ok" >> "$GITHUB_OUTPUT" + else + echo "dns=fail" >> "$GITHUB_OUTPUT" + fi + + - name: HTTP check + id: http + run: | + STATUS=$(curl -sIL --max-time 10 https://up2cloud.tech -o /dev/null -w "%{http_code}") + echo "status=$STATUS" >> "$GITHUB_OUTPUT" + echo "HTTP status: $STATUS" + + - name: Report result + run: | + DNS="${{ steps.dns.outputs.dns }}" + HTTP="${{ steps.http.outputs.status }}" + if [ "$DNS" = "ok" ] && [ "$HTTP" = "200" ]; then + echo "✅ up2cloud.tech is UP (HTTP $HTTP)" + else + echo "❌ up2cloud.tech is DOWN — DNS: $DNS | HTTP: $HTTP" + exit 1 + fi