From 0cea7342934c2d113703fd243e7591d6c5507957 Mon Sep 17 00:00:00 2001 From: South Drifted Date: Sun, 6 Oct 2024 10:33:23 +0000 Subject: [PATCH] [add] Lark notification of Git commit (fix #22) --- .github/workflows/Lark.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/Lark.yml b/.github/workflows/Lark.yml index 7cc201b..919a02c 100644 --- a/.github/workflows/Lark.yml +++ b/.github/workflows/Lark.yml @@ -9,6 +9,37 @@ jobs: send-Lark-message: runs-on: ubuntu-latest steps: + - name: Commits pushed + uses: foxundermoon/feishu-action@v2 + if: github.event_name == 'push' + with: + url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} + msg_type: post + content: | + post: + zh_cn: + title: GitHub 代码提交 + content: + - - tag: text + text: 提交链接: + - tag: a + text: ${{ github.event.head_commit.url }} + href: ${{ github.event.head_commit.url }} + - - tag: text + text: 代码分支: + - tag: a + text: ${{ github.ref }} + href: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }} + - - tag: text + text: 提交作者: + - tag: a + text: ${{ github.actor }} + href: ${{ github.server_url }}/${{ github.actor }} + - - tag: text + text: 提交信息: + - tag: text + text: | + ${{ github.event.head_commit.message }} - name: Issue/PR opened uses: foxundermoon/feishu-action@v2 if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened')