Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
ci(release): boot-smoke the published image on amd64 + arm64 before Release (#706)
Yudhi Armyndharis4cf577d3edd1
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex b713669e0..07bed0f03 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -195,11 +195,12 @@ jobs:release:name: GitHub Releaseruns-on: ubuntu-latest- # Gate the public Release on every CI-strength job AND a successfully built+pushed image, so a tag- # never produces a GitHub Release without passing the same gate CI enforces plus a matching- # container image (the docker job also builds the dashboard, which the gates above verify- # separately). Trades a few minutes of buildx latency for release/image consistency.- needs: [lint, test, test-postgres, dashboard, build, docker]+ # Gate the public Release on every CI-strength job AND a successfully built+pushed image that+ # also boots, so a tag never produces a GitHub Release without passing the same gate CI enforces,+ # a matching container image, and a runtime boot check on both architectures (boot-smoke runs the+ # published image on amd64 + arm64). Trades a few minutes of buildx/boot latency for release+ # safety.+ needs: [lint, test, test-postgres, dashboard, build, docker, boot-smoke]steps:- uses: actions/checkout@v7with:@@ -278,3 +279,66 @@ jobs:labels: ${{ steps.meta.outputs.labels }}cache-from: type=ghacache-to: type=gha,mode=max++ # ──── Boot Smoke (amd64 + arm64) ──────────────────────────────────+ # The docker job proves the image BUILDS for both architectures; this proves the just-pushed image+ # actually BOOTS and serves the liveness endpoint on both. A boot regression that only surfaces at+ # runtime on one architecture (e.g. a native-dep/Chromium SIGTRAP on arm64 that a clean build still+ # produces) cannot reach a public Release. Runs the published image — not a rebuild — against the+ # dependency-free /api/health/live (NOT /ready, which needs a DB and would conflate boot failure+ # with database setup). Both architectures are tried even if the first fails, so logs name both.+ boot-smoke:+ name: Boot smoke (amd64 + arm64)+ runs-on: ubuntu-latest+ needs: [docker]+ steps:+ - name: Set up QEMU+ uses: docker/setup-qemu-action@v4++ - name: Login to GitHub Container Registry+ uses: docker/login-action@v4+ with:+ registry: ghcr.io+ username: ${{ github.actor }}+ password: ${{ secrets.GITHUB_TOKEN }}++ - name: Resolve published image ref+ id: image+ # metadata-action publishes the {{version}} tag (e.g. 0.8.16) from the v-prefixed git tag, so+ # strip the leading "v" to match it. github.repository is trusted; the tag derives from the+ # pushed git ref, not from untrusted input.+ env:+ REPO: ${{ github.repository }}+ run: echo "ref=ghcr.io/${REPO}:${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"++ - name: Boot + liveness check on each architecture+ env:+ IMAGE: ${{ steps.image.outputs.ref }}+ run: |+ exit_code=0+ for platform in linux/amd64 linux/arm64; do+ echo "::group::boot-smoke $platform"+ docker rm -f openwa-smoke >/dev/null 2>&1 || true+ if ! docker run --rm --platform "$platform" -d -p 2785:2785 --name openwa-smoke "$IMAGE" >/dev/null; then+ echo "FAIL: $platform — could not start container (image pull/run error)"+ exit_code=1+ echo "::endgroup::"+ continue+ fi+ ok=""+ for i in $(seq 1 40); do+ if curl -sf http://127.0.0.1:2785/api/health/live >/dev/null 2>&1; then ok=1; break; fi+ sleep 5+ done+ if [ -n "$ok" ]; then+ echo "OK: $platform — /api/health/live returned 200"+ else+ echo "FAIL: $platform — /api/health/live did not return 200 within ~200s; container logs follow:"+ docker logs openwa-smoke 2>&1 | tail -60 || true+ exit_code=1+ fi+ docker stop openwa-smoke >/dev/null 2>&1 || true+ docker rm -f openwa-smoke >/dev/null 2>&1 || true+ echo "::endgroup::"+ done+ exit "$exit_code"diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a4fa954b0..d5b62b925 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -29,6 +29,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0the machine-readable contract can never silently drift from the code. SDK/API consumers now have aversioned artifact at the repo root.+- **Pre-release boot smoke on amd64 + arm64.** Cutting a release tag now runs the just-published+ image on both `linux/amd64` and `linux/arm64` (via QEMU) and polls the dependency-free+ `/api/health/live` endpoint before the GitHub Release is created — so a runtime-only boot regression+ on one architecture (a clean build can still produce a native-dep/Chromium SIGTRAP on arm64) cannot+ ship under a release. The Release job waits on the new boot-smoke job.+### Fixed- **OpenAPI export script under current env validation.** `scripts/export-openapi.ts` had been broken