James McConnell 1 год назад
Родитель
Сommit
60183bc48b
1 измененных файлов с 3 добавлено и 22 удалено
  1. 3 22
      .github/workflows/main.yml

+ 3 - 22
.github/workflows/main.yml

@@ -55,27 +55,8 @@ jobs:
   notify:
     runs-on: ubuntu-latest
     steps:
-      - name: Send telegram msg
-        if: inputs.releas_type == 'Actions'
-        env:
-          TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
-          TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
-          TELEGRAM_MESSAGE_THREAD_ID: ${{ secrets.TELEGRAM_MESSAGE_THREAD_ID }}
-        run: |
-          MESSAGE="🚀 Build started for ${{ github.repository }}!\n"
-          MESSAGE+="Workflow: ${{ github.workflow }}\n"
-          MESSAGE+="Event: ${{ github.event_name }}\n"
-          MESSAGE+="Branch: ${{ github.ref_name }}\n"
-          MESSAGE+="Commit: ${{ github.sha }}\n"
-          MESSAGE+="Triggered by: ${{ github.actor }}\n"
-          MESSAGE+="Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
-
-          curl -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
-            -d "chat_id=$TELEGRAM_CHAT_ID" \
-            -d "message_thread_id=$TELEGRAM_MESSAGE_THREAD_ID" \
-            -d "text=$MESSAGE"
-
       - name: Send Telegram Notification
+        if: inputs.release_type == 'Actions'
         run: |
           curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument" \
             -F chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
@@ -85,7 +66,7 @@ jobs:
             🗂️ *Branch:* ${{ github.ref_name }}
             ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
             [🔗 View GitHub Release](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts)" \
-            -F parse_mode="Markdown
+            -F parse_mode="Markdown"
             
   set-matrix:
     runs-on: ubuntu-latest
@@ -319,4 +300,4 @@ jobs:
             🗂️ *Branch:* ${{ github.ref_name }}
             ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
             [🔗 View GitHub Release](https://github.com/${{ github.repository }}//releases/tag/${{ env.NEW_TAG }})" \
-            -F parse_mode="Markdown
+            -F parse_mode="Markdown"