From b69c485a92bedd3ddcb9c6a5c177a1a28eb2c358 Mon Sep 17 00:00:00 2001 From: GuillaumeFalourd Date: Tue, 31 Dec 2024 10:44:01 -0300 Subject: [PATCH] update 74-n8n-integration --- .github/workflows/74-n8n-integration.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/74-n8n-integration.yml b/.github/workflows/74-n8n-integration.yml index f5ba83cd6b..0c4d002fd2 100644 --- a/.github/workflows/74-n8n-integration.yml +++ b/.github/workflows/74-n8n-integration.yml @@ -20,12 +20,20 @@ jobs: n8n-integration: runs-on: ubuntu-latest steps: - - name: Send POST request to N8N workflow using cURL + - name: Send POST request to N8N workflow using cURL to open an issue on this repository + env: + WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} run: | + echo "Workflow URL: $WORKFLOW_URL" curl -X POST https://${{secrets.N8N_ACCOUNT}}.app.n8n.cloud/webhook/${{ secrets.N8N_PATH}} \ -H "Content-Type: application/json" \ -d '{ "name": "${{ inputs.name }}", "email": "${{ inputs.email }}", "message": "${{ inputs.message }}" - }' \ No newline at end of file + "workflow_url": "'"$WORKFLOW_URL"'" + }' + if [ $? -ne 0 ]; then + echo "Error: cURL request failed." + exit 1 + fi \ No newline at end of file