소스 검색

ci(workflow): add telegram notification for actions builds

Add new workflow job to send telegram notifications when kernel actions builds complete, similar to existing release notifications
TheWildJames 8 달 전
부모
커밋
a008ebc464
1개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. 16 0
      .github/workflows/main.yml

+ 16 - 0
.github/workflows/main.yml

@@ -351,3 +351,19 @@ jobs:
           ✏️ *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"
+
+  notify-actions:
+    runs-on: ubuntu-latest
+    if: inputs.release_type == 'Actions'
+    steps:
+    - name: Send Telegram Notification
+      run: |
+        curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
+          -F chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
+          -F message_thread_id="${{ secrets.TELEGRAM_TOPIC_ID_GKI }}" \
+          -F text="
+          🌽 *New Kernel Actions Build Finished*
+          📦 *Repository:* [${{ github.repository }}](https://github.com/${{ github.repository }})
+          ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
+          [🔗 View Action Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" \
+          -F parse_mode="Markdown"