diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index fc23a15..4bf7da3 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -50,12 +50,10 @@ jobs: TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Lint\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Lint -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi @@ -69,12 +67,10 @@ Branch: ${{ github.ref_name }}" \ TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Unit Tests\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Unit Tests -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi @@ -88,12 +84,10 @@ Branch: ${{ github.ref_name }}" \ TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Build\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Build -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fc23a15..4bf7da3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,12 +50,10 @@ jobs: TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Lint\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Lint -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi @@ -69,12 +67,10 @@ Branch: ${{ github.ref_name }}" \ TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Unit Tests\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Unit Tests -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi @@ -88,12 +84,10 @@ Branch: ${{ github.ref_name }}" \ TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Build\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Build -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi