new_notify #41
@@ -42,17 +42,11 @@ runs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
echo "[DEBUG] Sending VK Teams notification..."
|
echo "[DEBUG] Sending VK Teams notification..."
|
||||||
JSON_PAYLOAD=$(jq -n \
|
curl -G "https://myteam.mail.ru/bot/v1/messages/sendText" \
|
||||||
--arg token "${{ env.token }}" \
|
--data-urlencode "token=${{ env.token }}" \
|
||||||
--arg to "${{ env.to }}" \
|
--data-urlencode "chatId=${{ env.to }}" \
|
||||||
--arg fmt "MarkdownV2" \
|
--data-urlencode "parseMode=MarkdownV2" \
|
||||||
--arg msg "*${{ github.repository }}* - [${{ inputs.name }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}) was *${{ inputs.result }}* by ${{ github.event.sender.login }} ${{ env.ICON }}" \
|
--data-urlencode "text=*${{ github.repository }}* - [${{ inputs.name }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}) was *${{ inputs.result }}* by ${{ github.event.sender.login }} ${{ env.ICON }}"
|
||||||
'{token: $token, chatId: $to, parseMode: $fmt, text: $msg}')
|
|
||||||
|
|
||||||
# Отправка запроса
|
|
||||||
curl -s -X POST "https://myteam.mail.ru/bot/v1/messages/sendText" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d "$JSON_PAYLOAD"
|
|
||||||
|
|
||||||
CODE=$?
|
CODE=$?
|
||||||
if [ $CODE -ne 0 ]; then
|
if [ $CODE -ne 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user