Webhook calls of custom BOT that support DingTalk, Lark and WeCom.
Usage of v1.1.0 and later
steps:
- name: Send Notification
uses: northwang-lucky/chatbot-webhook-client@latest
with:
# Required - DingTalk/Lark/WeCom
app: DingTalk
# Required - Custom BOT webhook URL
webhook: https://xxxx
# Optional - Used for sign
secret: xxxx
# Required - POST request body (JSON format string)
# If there are some double quotes '"' in your json body, please use '\"'
template: >-
{
"msgtype": "text",
"text": { "content": "This is a test message." }
}
# Or a JSON file URI (Relative to the repository root)
# Also, if there are special characters like '\n', '\r', '\t', '\f' in the JSON string, write it like this: '\\n'
# The content of the template file can refer to this:
# https://github.com/northwang-personal/chatbot-webhook-client/blob/master/.template/message.json
template: file://.template/message.json
# Required if template is a file URI - Parameters for file template (JSON format string)
params: >-
{
"title": "xxx",
"content": "xxx"
}
# Required if template is a file URI - Workflow will generate a GITHUB_TOKEN in secrets automatically, you can direct use "${{ secrets.GITHUB_TOKEN }}"
github-token: ${{ secrets.GITHUB_TOKEN }}
# Optional - The branch where the file resides (Defaults main)
branch: main
Usage before v1.1.0
steps:
- name: Send Notification
uses: northwang-lucky/chatbot-webhook-client@v1.0.1
with:
# Required - DingTalk/Lark/WeCom
app: DingTalk
# Required - Custom BOT webhook URL
webhook: https://xxxx
# Optional - Used for sign
secret: xxxx
# Required - POST request body (JSON format)
# If there are some double quotes '"' in your json body, please use '\"'
params: >-
{
"msgtype": "text",
"text": { "content": "This is a test message." }
}