mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-05 11:15:57 +00:00
Fix Slack notification payload formatting
- Write JSON to file to avoid shell escaping issues - Use --data-binary with file reference for proper JSON transmission - Removes double-stringification problem
This commit is contained in:
parent
2af9257562
commit
ff3145f282
1 changed files with 5 additions and 3 deletions
8
.github/workflows/slack-notify.yml
vendored
8
.github/workflows/slack-notify.yml
vendored
|
|
@ -105,7 +105,10 @@ jobs:
|
|||
}]
|
||||
};
|
||||
|
||||
core.setOutput('message', message);
|
||||
// Write message to file to avoid shell escaping issues
|
||||
const fs = require('fs');
|
||||
fs.writeFileSync('/tmp/slack-message.json', JSON.stringify(message));
|
||||
|
||||
return message;
|
||||
|
||||
- name: Send to Slack
|
||||
|
|
@ -113,8 +116,7 @@ jobs:
|
|||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
run: |
|
||||
echo '${{ toJson(steps.slack-message.outputs.message) }}' | \
|
||||
curl -X POST \
|
||||
-H 'Content-type: application/json' \
|
||||
--data @- \
|
||||
--data-binary @/tmp/slack-message.json \
|
||||
"$SLACK_WEBHOOK_URL"
|
||||
Loading…
Reference in a new issue