digitransit-ui/.github/workflows/scripts/slack_message.sh
2023-08-15 13:42:58 +03:00

7 lines
340 B
Bash
Executable file

#!/bin/bash
set -e
if [ -n "${SLACK_CHANNEL_ID}" ]; then
MSG='{"channel": "'$SLACK_CHANNEL_ID'","text":"'"${PUBLISHED_PACKAGES}"'\n", "username": "NPM publisher"}'
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $SLACK_ACCESS_TOKEN" -H 'Accept: */*' -d "$MSG" 'https://slack.com/api/chat.postMessage'
fi