Diffinery

codician/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

Fix the first deploy: Access audience parsing and smoke test wait (#2)

* Fix bootstrap reading the Access app's audience

${WEB_APP:-{}} expands to the JSON plus a stray closing brace, so jq
failed and stopped the first deploy right after creating the Access app.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AizKXSsengXZRegJxRATkL

* Give the deploy smoke test time for the first certificate

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AizKXSsengXZRegJxRATkL

---------

Co-authored-by: Claude <noreply@anthropic.com>
Canberk Demirci authored · GitHub committed signed1 parent 5387f79commit d77e9f67e31281610bdf844e06898f08db444c26Browse files
2 files changed+3−2
modified.github/workflows/deploy.yml+2−1View file
@@ -59,7 +59,8 @@
5959
6060 - name: Smoke test
6161 run: |
62- for i in 1 2 3 4 5 6; do
62+ # A new custom domain can take a few minutes to get its certificate.
63+ for i in $(seq 1 30); do
6364 code=$(curl -s -o /dev/null -w '%{http_code}' https://diffinery.com/healthz) && [ "$code" = 200 ] && exit 0
6465 sleep 10
6566 done
modifiedscripts/bootstrap.sh+1−1View file
@@ -99,7 +99,7 @@
9999 WEB_APP="$(cf PUT "/access/apps/$WEB_ID" "$WEB_BODY" | jq -c '.result // empty')"
100100 [[ -n "$WEB_APP" ]] && echo "Access app covers $DOMAIN/auth/access" || warn "Could not update the Access application."
101101 fi
102- AUD="$(jq -r '.aud // empty' <<<"${WEB_APP:-{}}")"
102+ AUD="$(jq -r '.aud // empty' <<<"${WEB_APP:-null}")"
103103
104104 # Earlier versions put Access in front of the whole site and needed a bypass app; remove it.
105105 BYPASS_ID="$(jq -r '.result[] | select(.name=="Diffinery machine endpoints") | .id' <<<"$APPS" | head -n1)"