diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml
index f22a5ba6..d3eceb6f 100644
--- a/.gitea/workflows/cd.yaml
+++ b/.gitea/workflows/cd.yaml
@@ -43,11 +43,13 @@ jobs:
echo "start_time=$(date +%s)" >> $GITHUB_OUTPUT
- name: Notify Pipeline Start
+ env:
+ TG_MSG: "š AWOOOI éØē½²éå§\nā š ${{ steps.commit.outputs.message }}\nā š ${{ steps.commit.outputs.short_sha }}\nā š¤ ${{ github.actor }}\nā šæ main"
run: |
- curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
- -d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
- -d parse_mode="HTML" \
- -d "text=š AWOOOI éØē½²éå§%0Aā š ${{ steps.commit.outputs.message }}%0Aā š ${{ steps.commit.outputs.short_sha }}%0Aā š¤ ${{ github.actor }}%0Aā šæ main"
+ printf '%b' "$TG_MSG" | curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
+ -d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
+ -d "parse_mode=HTML" \
+ --data-urlencode "text@-"
@@ -206,20 +208,24 @@ jobs:
CHECK
- name: Notify Health Check Success
+ env:
+ TG_MSG: "ā
AWOOOI éØē½²å®ę\nā š ${{ steps.commit.outputs.message }}\nā š ${{ steps.commit.outputs.short_sha }}\nā ā±ļø čę: ${MINUTES}m ${SECONDS}s\nā š¦ API: ā
Web: ā
\nā š©ŗ Health: ā
"
run: |
END_TIME=$(date +%s)
DURATION=$((END_TIME - ${{ steps.commit.outputs.start_time }}))
MINUTES=$((DURATION / 60))
SECONDS=$((DURATION % 60))
- curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
- -d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
- -d parse_mode="HTML" \
- -d "text=ā
AWOOOI éØē½²å®ę%0Aā š ${{ steps.commit.outputs.message }}%0Aā š ${{ steps.commit.outputs.short_sha }}%0Aā ā±ļø čę: ${MINUTES}m ${SECONDS}s%0Aā š¦ API: ā
Web: ā
%0Aā š©ŗ Health: ā
"
+ printf '%b' "$TG_MSG" | curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
+ -d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
+ -d "parse_mode=HTML" \
+ --data-urlencode "text@-"
- name: Notify Pipeline Failure
if: failure()
+ env:
+ TG_MSG: "ā AWOOOI éØē½²å¤±ę\nā š ${{ steps.commit.outputs.message }}\nā š ${{ steps.commit.outputs.short_sha }}\nā š¤ ${{ github.actor }}\nā š ę„ēę„čŖ"
run: |
- curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
- -d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
- -d parse_mode="HTML" \
- -d "text=ā AWOOOI éØē½²å¤±ę%0Aā š ${{ steps.commit.outputs.message }}%0Aā š ${{ steps.commit.outputs.short_sha }}%0Aā š¤ ${{ github.actor }}%0Aā š ę„ēę„čŖ"
+ printf '%b' "$TG_MSG" | curl -fS -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
+ -d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
+ -d "parse_mode=HTML" \
+ --data-urlencode "text@-"