From e1158fa5e44741ef2794eeb35cc6ba257c30a478 Mon Sep 17 00:00:00 2001 From: geniusay <969025903@qq.com> Date: Thu, 12 Mar 2026 14:07:33 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0=20Discord=20=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 GitHub Actions 工作流,在发布、推送和拉取请求事件时向 Discord 发送通知。使用现有社区 Action 实现,需配置 Discord Webhook 密钥。 --- .github/workflows/discord-github-notify.yml | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/discord-github-notify.yml diff --git a/.github/workflows/discord-github-notify.yml b/.github/workflows/discord-github-notify.yml new file mode 100644 index 0000000..f698692 --- /dev/null +++ b/.github/workflows/discord-github-notify.yml @@ -0,0 +1,23 @@ +name: Discord Notification + +on: + release: + types: [published] + push: + branches: ['**'] + pull_request: + types: [opened, closed] + +jobs: + discord-notify: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Discord Notification + uses: Time-Machine-Lab/TML-Github_Actions/actions/discord-github-notify@main + with: + webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }} \ No newline at end of file