fix(ci): change curl to fail on error (-fS) for telegram notification
This commit is contained in:
@@ -27,7 +27,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Notify Pipeline Start
|
- name: Notify Pipeline Start
|
||||||
run: |
|
run: |
|
||||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||||
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||||
-d text="🚀 [AWOOOI CI/CD] Pipeline Started by ${{ github.actor }} (Commit: ${{ github.sha }})"
|
-d text="🚀 [AWOOOI CI/CD] Pipeline Started by ${{ github.actor }} (Commit: ${{ github.sha }})"
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Notify API Build
|
- name: Notify API Build
|
||||||
run: |
|
run: |
|
||||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||||
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||||
-d text="📦 [AWOOOI CI/CD] API Image Built & Pushed"
|
-d text="📦 [AWOOOI CI/CD] API Image Built & Pushed"
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Notify Web Build
|
- name: Notify Web Build
|
||||||
run: |
|
run: |
|
||||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||||
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||||
-d text="📦 [AWOOOI CI/CD] Web Image Built & Pushed"
|
-d text="📦 [AWOOOI CI/CD] Web Image Built & Pushed"
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Notify K8s Deploy
|
- name: Notify K8s Deploy
|
||||||
run: |
|
run: |
|
||||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||||
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||||
-d text="🚢 [AWOOOI CI/CD] K8s Deployment Triggered"
|
-d text="🚢 [AWOOOI CI/CD] K8s Deployment Triggered"
|
||||||
|
|
||||||
@@ -134,13 +134,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Notify Health Check Success
|
- name: Notify Health Check Success
|
||||||
run: |
|
run: |
|
||||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||||
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||||
-d text="✅ [AWOOOI CI/CD] Health Check Passed! Pipeline Complete."
|
-d text="✅ [AWOOOI CI/CD] Health Check Passed! Pipeline Complete."
|
||||||
|
|
||||||
- name: Notify Pipeline Failure
|
- name: Notify Pipeline Failure
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||||
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||||
-d text="❌ [AWOOOI CI/CD] Pipeline Failed! Please check Gitea Actions logs."
|
-d text="❌ [AWOOOI CI/CD] Pipeline Failed! Please check Gitea Actions logs."
|
||||||
|
|||||||
Reference in New Issue
Block a user