diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5392e8b..a0c2fbf 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -211,15 +211,27 @@ jobs: - name: Dispatch to Repository run: | + XML_BLOCK="${{ steps.xmlblock.outputs.block }}" + + JSON=$(jq -n \ + --arg type "plugin-released" \ + --arg plugin "${{ steps.cfg.outputs.name }}" \ + --arg channel "${{ steps.info.outputs.channel }}" \ + --arg xml "$XML_BLOCK" \ + '{ + type: $type, + payload: { + plugin: $plugin, + channel: $channel, + xml_block: $xml + } + }') + + echo "Dispatch JSON:" + echo "$JSON" + curl -s -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ - -d "{ - \"type\": \"plugin-released\", - \"payload\": { - \"plugin\": \"${{ steps.cfg.outputs.name }}\", - \"channel\": \"${{ steps.info.outputs.channel }}\", - \"xml_block\": \"${{ steps.xmlblock.outputs.block }}\" - } - }" + -d "$JSON"