Files
dingtalk-bot/.gitea/workflows/dingtalk-feedcard.yml

45 lines
1.2 KiB
YAML

name: DingTalk FeedCard Notification
on:
workflow_dispatch:
inputs:
webhook_url:
description: "钉钉机器人 Webhook URL"
required: true
type: string
feed_links:
description: "FeedCard 链接 JSON 数组"
required: true
default: |
[
{
"title": "示例工作流",
"messageURL": "https://example.com/workflow",
"picURL": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
},
{
"title": "示例仓库",
"messageURL": "https://example.com/repo",
"picURL": "https://avatars.githubusercontent.com/u/9919?s=200&v=4"
}
]
type: string
env:
DINGTALK_WEBHOOK: ${{ github.event.inputs.webhook_url }}
jobs:
send-feedcard:
runs-on: ubuntu-latest
name: 发送 FeedCard 消息
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 发送 FeedCard
uses: ./
with:
webhook_url: ${{ env.DINGTALK_WEBHOOK }}
message_type: feedCard
feed_links: ${{ github.event.inputs.feed_links }}