fix(ci): resolve invalid YAML formatting in Telegram notification steps
This commit is contained in:
@@ -50,12 +50,10 @@ jobs:
|
|||||||
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then
|
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" \
|
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
|
||||||
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
||||||
-d "text=❌ Momento CI Failed
|
--data-urlencode "text=${MSG}" \
|
||||||
Step: Lint
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
Branch: ${{ github.ref_name }}" \
|
|
||||||
-d "parse_mode=Markdown" || true
|
-d "parse_mode=Markdown" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -69,12 +67,10 @@ Branch: ${{ github.ref_name }}" \
|
|||||||
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then
|
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" \
|
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
|
||||||
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
||||||
-d "text=❌ Momento CI Failed
|
--data-urlencode "text=${MSG}" \
|
||||||
Step: Unit Tests
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
Branch: ${{ github.ref_name }}" \
|
|
||||||
-d "parse_mode=Markdown" || true
|
-d "parse_mode=Markdown" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -88,12 +84,10 @@ Branch: ${{ github.ref_name }}" \
|
|||||||
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then
|
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" \
|
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
|
||||||
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
||||||
-d "text=❌ Momento CI Failed
|
--data-urlencode "text=${MSG}" \
|
||||||
Step: Build
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
Branch: ${{ github.ref_name }}" \
|
|
||||||
-d "parse_mode=Markdown" || true
|
-d "parse_mode=Markdown" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
18
.github/workflows/ci.yaml
vendored
18
.github/workflows/ci.yaml
vendored
@@ -50,12 +50,10 @@ jobs:
|
|||||||
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then
|
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" \
|
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
|
||||||
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
||||||
-d "text=❌ Momento CI Failed
|
--data-urlencode "text=${MSG}" \
|
||||||
Step: Lint
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
Branch: ${{ github.ref_name }}" \
|
|
||||||
-d "parse_mode=Markdown" || true
|
-d "parse_mode=Markdown" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -69,12 +67,10 @@ Branch: ${{ github.ref_name }}" \
|
|||||||
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then
|
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" \
|
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
|
||||||
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
||||||
-d "text=❌ Momento CI Failed
|
--data-urlencode "text=${MSG}" \
|
||||||
Step: Unit Tests
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
Branch: ${{ github.ref_name }}" \
|
|
||||||
-d "parse_mode=Markdown" || true
|
-d "parse_mode=Markdown" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -88,12 +84,10 @@ Branch: ${{ github.ref_name }}" \
|
|||||||
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then
|
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" \
|
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
|
||||||
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
-d "chat_id=${TELEGRAM_CHAT_ID}" \
|
||||||
-d "text=❌ Momento CI Failed
|
--data-urlencode "text=${MSG}" \
|
||||||
Step: Build
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
Branch: ${{ github.ref_name }}" \
|
|
||||||
-d "parse_mode=Markdown" || true
|
-d "parse_mode=Markdown" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user