feat: 添加企业微信通知

master
绝弹 2024-01-16 14:15:56 +08:00 committed by GitHub
parent 652703f371
commit 8120ba3cd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,8 @@ jobs:
run: |
MSG=$(git log --format=%B -n 1 ${{ github.sha }})
echo "msg=$MSG" >> "$GITHUB_OUTPUT"
HASH=$(git log -1 --pretty=format:%h)
echo "hash1=$MSG" >> "$GITHUB_ENV"
shell: bash
- name: 推送到企微
@ -50,4 +52,4 @@ jobs:
WECHAT_WORK_BOT_WEBHOOK: ${{secrets.WECHAT_WORK_BOT_WEBHOOK}}
with:
msgtype: text
content: "推送通知\n\n仓库名称${{ github.repository }}\n提交用户${{ github.actor }}\n提交消息${{ steps.exec_cmd.outputs.msg }}\n提交哈希${{ github.sha }}\n\n提醒已有提交推送到仓库请留意构建结果。"
content: "推送通知\n\n仓库名称${{ github.repository }}\n提交用户${{ github.actor }}\n提交消息${{ steps.exec_cmd.outputs.msg }}\n提交哈希${{ env.hash1 }}\n\n提醒已有提交推送到仓库请留意构建结果。"