fix(ci): send X-GitHub-Event on the CDN deploy webhook - #45
Conversation
Dokploy reads the branch from the body only when the request carries an X-GitHub-Event header; without it the webhook answered 301 "Branch Not Match" and deployed nothing, so verify-cdn-release failed the 0.13.1 release with a stale CDN. 301 is not an error status, so --fail let the job pass green: check the status code instead.
📝 WalkthroughWalkthroughThe release workflow now sends the CDN webhook with the required event header and main-branch ref. It captures HTTP status, retries transient failures, accepts only 2xx responses as successful, and warns on other outcomes. ChangesCDN redeploy workflow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 267-271: Update the deployment POST command in the release
workflow to remove curl retry behavior, including --retry, --retry-all-errors,
and --retry-delay, unless the configured WEBHOOK provides an idempotency
guarantee; retain the existing request, timeout, and status handling.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 59fe6226-1542-45d4-b934-23bfe92be085
📒 Files selected for processing (1)
.github/workflows/release.yml
|
On the CodeRabbit retry finding: keeping the retries. A repeated POST re-deploys the same |
Related Issue
No issue — the 0.13.1 release run failed in CI; the problem is described below.
Problem
The
Redeploy CDNjob of the 0.13.1 release reported success but deployednothing, and
Verify release consistencythen failed after 600s withcdn=0.13.0 latest=0.13.1, so the release stayed invisible to installedclients.
Two causes:
extractBranchNamereadsbody.refonly when the requestcarries an
X-GitHub-Event(or gitea/gitlab/bitbucket) header. Without itthe branch resolves to
null, the handler answers301 {"message":"Branch Not Match"}and no deploy is queued.301is not an error status, socurl --faildid not trip and the jobexited 0 — the failed deploy read as a successful one.
Verified against the live webhook: the same POST plus
-H 'X-GitHub-Event: push'answers200 {"message":"Application deployed successfully"}, andhttps://code.pythinker.com/pythinker-code/latest.jsonnow serves
0.13.1. The re-run ofVerify release consistencyon the releaserun is green.
What changed
X-GitHub-Event: pushwith the Dokploy deploy webhook.2xx, instead ofrelying on
--fail, which cannot see a301. The job still never fails theworkflow —
verify-cdn-releaseremains the loud gate.Checklist
repo; verified against the live Dokploy webhook (200 + CDN now at 0.13.1).
gen-changesetsskill, or this PR needs no changeset. — CI-onlychange, no package bump.
gen-docsskill, or this PR needs no doc update.Summary by CodeRabbit