File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ color=" "
4+ if [ $2 == " success" ]
5+ then
6+ echo " success"
7+ color=" info"
8+ else
9+ echo " fail"
10+ color=" warning"
11+ fi
12+
13+ curl " https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=$IOT_WECOM_CID_ROBOT_KEY " \
14+ -H ' Content-Type: application/json' \
15+ -d '
16+ {
17+ "msgtype": "markdown",
18+ "markdown": {
19+ "content": "**repo: \"' " $1 " ' \"**\n
20+ >result:<font color=\"' " $color " ' \">\"' " $2 " ' \"</font>\n
21+ >[action](https://github.com/tencentyun/iot-device-python/actions)"\n
22+ }
23+ }'
Original file line number Diff line number Diff line change 77 - ' **.md'
88 - ' LICENSE'
99
10+ env :
11+ IOT_WECOM_CID_ROBOT_KEY : ${{ secrets.IOT_WECOM_CID_ROBOT_KEY }}
12+
1013jobs :
1114
1215 build :
6063 sed -i "s#version=.*#version=\"$VERSION\",#g" setup.py
6164 python setup.py sdist bdist_wheel
6265 twine upload dist/*
66+ - name : Report success result to wecom
67+ if : ${{ success() }}
68+ run : |
69+ echo success!!!
70+ bash .github/scripts/send_result_to_wecom.sh ${{ github.event.repository.name }} success
71+ - name : Report fail result to wecom
72+ if : ${{ failure() }}
73+ run : |
74+ echo fail!!!
75+ bash .github/scripts/send_result_to_wecom.sh ${{ github.event.repository.name }} fail
You can’t perform that action at this time.
0 commit comments