fix(build): trigger release
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m35s
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m35s
This commit is contained in:
@@ -55,16 +55,14 @@ jobs:
|
||||
GITEA_URL: ${{ vars.GT_URL }}
|
||||
|
||||
- name: Trigger Ansible Deploy Playbook
|
||||
if: steps.build.outputs.VERSION != ''
|
||||
run: |
|
||||
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"}' \
|
||||
-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 ]
|
||||
uses: https://github.com/distributhor/workflow-webhook@v3
|
||||
with:
|
||||
webhook_url: ${{ vars.WEBHOOK_URL }}
|
||||
webhook_auth_type: bearer
|
||||
webhook_auth: Token:${{ secrets.WEBHOOK_SECRET }}
|
||||
verbose: true
|
||||
data: >
|
||||
{
|
||||
"artifact_url":
|
||||
"${{ gitea.server_url }}/${{ gitea.repository }}/releases/download/v${{ steps.build.outputs.VERSION }}/release-${{ steps.build.outputs.VERSION }}.tar.gz"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user