feat: 添加 gitea action 使用示例

This commit is contained in:
ren
2025-10-16 09:52:19 +08:00
parent 428795c6a5
commit 0986aef9db
5 changed files with 278 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
name: DingTalk Markdown Notification
on:
workflow_dispatch:
inputs:
webhook_url:
description: '钉钉机器人 Webhook URL'
required: true
type: string
title:
description: '消息标题'
required: true
default: '示例 Markdown 标题'
type: string
content:
description: 'Markdown 消息内容'
required: true
default: '这是一个手动触发的 Markdown 示例消息'
type: string
at_mobiles:
description: '@指定手机号 (可选,多个用逗号分隔)'
required: false
default: ''
type: string
env:
DINGTALK_WEBHOOK: ${{ github.event.inputs.webhook_url }}
jobs:
send-markdown:
runs-on: ubuntu-latest
name: 发送 Markdown 消息
steps:
- name: 发送基础 Markdown 消息
uses: ./
with:
webhook_url: ${{ env.DINGTALK_WEBHOOK }}
message_type: 'markdown'
title: ${{ github.event.inputs.title }}
content: ${{ github.event.inputs.content }}
- name: 带@功能的 Markdown 消息
if: ${{ github.event.inputs.at_mobiles != '' }}
uses: ./
with:
webhook_url: ${{ env.DINGTALK_WEBHOOK }}
message_type: 'markdown'
title: ${{ github.event.inputs.title }}
content: ${{ github.event.inputs.content }}
at_mobiles: ${{ github.event.inputs.at_mobiles }}