From f2c4e73b8ca2146bb1e0cf904ccd03cd2b7d3282 Mon Sep 17 00:00:00 2001 From: Patrick Toal Date: Fri, 20 Mar 2026 13:45:28 -0400 Subject: [PATCH] fix(build): fix ansible trigger --- .gitea/workflows/build.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 5d34fee..9cec89c 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -57,8 +57,14 @@ jobs: - name: Trigger Ansible Deploy Playbook if: steps.build.outputs.VERSION != '' run: | - curl --fail-with-body -sS \ + response=$(curl -sS \ -H "Authorization: Bearer ${{ secrets.WEBHOOK_SECRET }}" \ -H "Content-Type: application/json" \ -d '{"artifact_url":"${{ gitea.server_url }}/${{ gitea.repository }}/releases/download/v${{ steps.build.outputs.VERSION }}/release-${{ steps.build.outputs.VERSION }}.tar.gz"}' \ - "${{ vars.WEBHOOK_URL }}" + -w "\n%{http_code}" \ + "${{ vars.WEBHOOK_URL }}") + http_code=$(echo "$response" | tail -1) + body=$(echo "$response" | head -n -1) + echo "Response: $body" + echo "HTTP status: $http_code" + [ "$http_code" -ge 200 ] && [ "$http_code" -lt 300 ]