Files
oh-my-pi/scripts/ping.sh
T
can1357 d7067af878 feat(cross-cutting): added Bun/Vite dashboard with /static integration
- Added a Bun/Vite dashboard frontend with App views for status, issues, events, logs, triggers, and working queue.
- Added dashboard backend support by mounting `/static`, serving package assets, and injecting replay config into `index.html`.
- Added client API/state modules for polling, retry, cancel, browse filtering, and config validation in the SPA.
- Replaced `justfile` task orchestration with bun scripts, updating README/AGENTS and command docs.
- Added Docker, Bun config, and ignorefiles to build web assets, copy them into runtime static data, and prune artifacts.
- Added webhook ping helper plus dashboard test fixtures for bootstrap HTML and replay-token substitution.
2026-05-15 04:58:28 +02:00

18 lines
592 B
Bash
Executable File

#!/usr/bin/env bash
# POST a synthetic ping to /webhook/github, signed with $GITHUB_WEBHOOK_SECRET.
set -euo pipefail
: "${GITHUB_WEBHOOK_SECRET:?missing in .env}"
: "${ROBOMP_BIND_PORT:=8080}"
body='{"zen":"bun ping","hook_id":0}'
sig="sha256=$(printf '%s' "$body" | openssl dgst -sha256 -hmac "$GITHUB_WEBHOOK_SECRET" -r | awk '{print $1}')"
curl -fsS -X POST "http://localhost:${ROBOMP_BIND_PORT}/webhook/github" \
-H 'Content-Type: application/json' \
-H 'X-GitHub-Event: ping' \
-H "X-GitHub-Delivery: bun-$(date +%s)" \
-H "X-Hub-Signature-256: $sig" \
--data "$body"
echo