File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Expand file tree Collapse file tree 3 files changed +45
-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-link-android/actions)"\n
22+ }
23+ }'
Original file line number Diff line number Diff line change 1414 IOT_SONATYPE_USERNAME : ${{ secrets.IOT_SONATYPE_USERNAME }}
1515 IOT_SONATYPE_PASSWORD : ${{ secrets.IOT_SONATYPE_PASSWORD }}
1616 GPG_DECRYPT_PASSPHRASE : ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
17+ IOT_WECOM_CID_ROBOT_KEY : ${{ secrets.IOT_WECOM_CID_ROBOT_KEY }}
1718
1819jobs :
1920 build :
9697 fir publish $demoApk -T $IOT_FIRIM_API_TOKEN -c "$rl" --oversea_turbo --force_pin_history -V
9798 env :
9899 IOT_FIRIM_API_TOKEN : ${{ secrets.IOT_FIRIM_API_TOKEN }}
100+ - name : Report success result to wecom
101+ if : ${{ success() }}
102+ run : |
103+ echo success!!!
104+ bash .github/scripts/send_result_to_wecom.sh ${{ github.event.repository.name }} success
105+ - name : Report fail result to wecom
106+ if : ${{ failure() }}
107+ run : |
108+ echo fail!!!
109+ bash .github/scripts/send_result_to_wecom.sh ${{ github.event.repository.name }} fail
Original file line number Diff line number Diff line change 1212 IOT_GPG_KEYNAME : ${{ secrets.IOT_GPG_KEYNAME }}
1313 IOT_GPG_PASSPHRASE : ${{ secrets.IOT_GPG_PASSPHRASE }}
1414 IOT_GITHUB_ACCESS_TOKEN : ${{ secrets.IOT_GITHUB_ACCESS_TOKEN }}
15+ IOT_WECOM_CID_ROBOT_KEY : ${{ secrets.IOT_WECOM_CID_ROBOT_KEY }}
1516
1617jobs :
1718 build :
@@ -174,3 +175,13 @@ jobs:
174175 fir publish $demoApk -T $IOT_FIRIM_API_TOKEN -c "$rl" --oversea_turbo --force_pin_history -V
175176 env :
176177 IOT_FIRIM_API_TOKEN : ${{ secrets.IOT_FIRIM_API_TOKEN }}
178+ - name : Report success result to wecom
179+ if : ${{ success() }}
180+ run : |
181+ echo success!!!
182+ bash .github/scripts/send_result_to_wecom.sh ${{ github.event.repository.name }} success
183+ - name : Report fail result to wecom
184+ if : ${{ failure() }}
185+ run : |
186+ echo fail!!!
187+ 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