From 8943eeb0d766ebc5f7138a86d62856aeed6824ac Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Sat, 9 May 2026 14:48:56 +0700 Subject: [PATCH] Fail backend deploy on webhook errors --- .gitea/workflows/build-and-deploy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml index b6a7994..6c0bcbe 100644 --- a/.gitea/workflows/build-and-deploy.yml +++ b/.gitea/workflows/build-and-deploy.yml @@ -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: |