Fail backend deploy on webhook errors
All checks were successful
Build and deploy Backend / build (push) Successful in 26s

This commit is contained in:
Ruslan Bakiev
2026-05-09 14:48:56 +07:00
parent 0244f64df7
commit 8943eeb0d7

View File

@@ -52,10 +52,13 @@ jobs:
{"ref":"refs/heads/main","after":"$GITHUB_SHA","commits":[{"id":"$GITHUB_SHA","message":"$SERVICE_NAME #${GITHUB_RUN_NUMBER:-0} ${GITHUB_SHA:0:7}"}]}
JSON
)
curl -fsS -X POST "$DOKPLOY_DEPLOY_WEBHOOK" \
response_file="$(mktemp)"
status_code="$(curl -sS -o "$response_file" -w "%{http_code}" -X POST "$DOKPLOY_DEPLOY_WEBHOOK" \
-H "x-gitea-event: push" \
-H "Content-Type: application/json" \
-d "$payload"
-d "$payload")"
cat "$response_file"
[ "$status_code" = "200" ]
- name: Prune shared BuildKit cache
run: |