Files
DocumentServer-v-9.2.0/sdkjs/.github/actions/send-message/action.yml
Yajbir Singh f1b860b25c
Some checks failed
check / markdownlint (push) Has been cancelled
check / spellchecker (push) Has been cancelled
updated
2025-12-11 19:03:17 +05:30

35 lines
1.0 KiB
YAML

name: 'Send message to telegram'
description: 'Send message to telegram'
inputs:
token:
required: true
chat:
required: true
message:
required: false
default: |
Workflow: ${{ github.workflow }}
Github job: ${{ github.job }}
Github job status: '❌' - ${{ job.status }}
Branch: ${{ github.ref_name }}
See action run logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}
runs:
using: "composite"
steps:
- name: Send message to telegram
shell: bash
env:
MESSAGE: ${{ inputs.message }}
run: |
MESSAGE=$(echo "$MESSAGE" | sed 's/"/\\"/g')
curl -s -X POST "https://api.telegram.org/bot${{ inputs.token }}/sendMessage" \
-H "Content-Type: application/json" \
-d "{
\"chat_id\": \"${{ inputs.chat }}\",
\"text\": \"$MESSAGE\",
\"parse_mode\": \"Markdown\",
\"disable_notification\": true,
\"disable_web_page_preview\": true
}"