Browse Source

test: test feishu bot

Sidney233 4 tháng trước cách đây
mục cha
commit
be5260dda5
1 tập tin đã thay đổi với 23 bổ sung23 xóa
  1. 23 23
      .github/workflows/huigui.yml

+ 23 - 23
.github/workflows/huigui.yml

@@ -38,27 +38,27 @@ jobs:
         cd $GITHUB_WORKSPACE && coverage run
         cd $GITHUB_WORKSPACE && python tests/get_coverage.py
 
-#  notify_to_feishu:
+  notify_to_feishu:
 #    if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure')}}
-#    needs: cli-test
-#    runs-on: pdf
-#    steps:
-#    - name: get_actor
-#      run: |
-#          metion_list="dt-yy"
-#          echo $GITHUB_ACTOR
-#          if [[ $GITHUB_ACTOR == "drunkpig" ]]; then
-#            metion_list="xuchao"
-#          elif [[ $GITHUB_ACTOR == "myhloli" ]]; then
-#            metion_list="zhaoxiaomeng"
-#          elif [[ $GITHUB_ACTOR == "icecraft" ]]; then
-#            metion_list="xurui1"
-#          fi
-#          echo $metion_list
-#          echo "METIONS=$metion_list" >> "$GITHUB_ENV"
-#          echo ${{ env.METIONS }}
-#
-#    - name: notify
-#      run: |
-#        #echo ${{ secrets.USER_ID }}
-#        curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"post","content":{"post":{"zh_cn":{"title":"'${{ github.repository }}' GitHubAction Failed","content":[[{"tag":"text","text":""},{"tag":"a","text":"Please click here for details ","href":"https://github.com/'${{ github.repository }}'/actions/runs/'${GITHUB_RUN_ID}'"},{"tag":"at","user_id":"'$USER_ID'"}]]}}}}'  $WEBHOOK_URL
+    needs: cli-test
+    runs-on: ubuntu-latest
+    steps:
+    - name: get_actor
+      run: |
+          metion_list="dt-yy"
+          echo $GITHUB_ACTOR
+          if [[ $GITHUB_ACTOR == "drunkpig" ]]; then
+            metion_list="xuchao"
+          elif [[ $GITHUB_ACTOR == "myhloli" ]]; then
+            metion_list="zhaoxiaomeng"
+          elif [[ $GITHUB_ACTOR == "icecraft" ]]; then
+            metion_list="xurui1"
+          fi
+          echo $metion_list
+          echo "METIONS=$metion_list" >> "$GITHUB_ENV"
+          echo ${{ env.METIONS }}
+
+    - name: notify
+      run: |
+        echo ${{ secrets.USER_ID }}
+        curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"post","content":{"post":{"zh_cn":{"title":"'${{ github.repository }}' GitHubAction Failed","content":[[{"tag":"text","text":""},{"tag":"a","text":"Please click here for details ","href":"https://github.com/'${{ github.repository }}'/actions/runs/'${GITHUB_RUN_ID}'"}]]}}}}'  $WEBHOOK_URL