feature/registers-generate-test-data-command #13
@@ -63,6 +63,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Telegram notify (lint failed)
|
- name: Telegram notify (lint failed)
|
||||||
if: failure()
|
if: failure()
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ -z "${TG_BOT_KEY:-}" ] || [ -z "${TG_CHANNEL:-}" ]; then
|
if [ -z "${TG_BOT_KEY:-}" ] || [ -z "${TG_CHANNEL:-}" ]; then
|
||||||
@@ -78,9 +79,16 @@ jobs:
|
|||||||
actor=${GITHUB_ACTOR}
|
actor=${GITHUB_ACTOR}
|
||||||
commit=${COMMIT_MESSAGE}"
|
commit=${COMMIT_MESSAGE}"
|
||||||
|
|
||||||
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
|
curl -fsS \
|
||||||
|
--connect-timeout 5 \
|
||||||
|
--max-time 15 \
|
||||||
|
--retry 2 \
|
||||||
|
--retry-delay 2 \
|
||||||
|
--retry-all-errors \
|
||||||
|
-X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
|
||||||
-d "chat_id=${TG_CHANNEL}" \
|
-d "chat_id=${TG_CHANNEL}" \
|
||||||
--data-urlencode "text=${MSG}"
|
--data-urlencode "text=${MSG}" \
|
||||||
|
|| echo "Telegram notification failed; continue pipeline"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
@@ -128,6 +136,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Telegram notify (test failed)
|
- name: Telegram notify (test failed)
|
||||||
if: failure()
|
if: failure()
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ -z "${TG_BOT_KEY:-}" ] || [ -z "${TG_CHANNEL:-}" ]; then
|
if [ -z "${TG_BOT_KEY:-}" ] || [ -z "${TG_CHANNEL:-}" ]; then
|
||||||
@@ -143,13 +152,21 @@ jobs:
|
|||||||
actor=${GITHUB_ACTOR}
|
actor=${GITHUB_ACTOR}
|
||||||
commit=${COMMIT_MESSAGE}"
|
commit=${COMMIT_MESSAGE}"
|
||||||
|
|
||||||
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
|
curl -fsS \
|
||||||
|
--connect-timeout 5 \
|
||||||
|
--max-time 15 \
|
||||||
|
--retry 2 \
|
||||||
|
--retry-delay 2 \
|
||||||
|
--retry-all-errors \
|
||||||
|
-X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
|
||||||
-d "chat_id=${TG_CHANNEL}" \
|
-d "chat_id=${TG_CHANNEL}" \
|
||||||
--data-urlencode "text=${MSG}"
|
--data-urlencode "text=${MSG}" \
|
||||||
|
|| echo "Telegram notification failed; continue pipeline"
|
||||||
|
|
||||||
notify_success:
|
notify_success:
|
||||||
name: Telegram Notify Success
|
name: Telegram Notify Success
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 1
|
||||||
needs: [lint, test]
|
needs: [lint, test]
|
||||||
if: |
|
if: |
|
||||||
always() &&
|
always() &&
|
||||||
@@ -160,6 +177,7 @@ jobs:
|
|||||||
TG_CHANNEL: ${{ secrets.TG_CHANNEL }}
|
TG_CHANNEL: ${{ secrets.TG_CHANNEL }}
|
||||||
steps:
|
steps:
|
||||||
- name: Telegram notify (lint+test success)
|
- name: Telegram notify (lint+test success)
|
||||||
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
||||||
run: |
|
run: |
|
||||||
@@ -175,6 +193,13 @@ jobs:
|
|||||||
actor=${GITHUB_ACTOR}
|
actor=${GITHUB_ACTOR}
|
||||||
commit=${COMMIT_MESSAGE:-n/a}"
|
commit=${COMMIT_MESSAGE:-n/a}"
|
||||||
|
|
||||||
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
|
curl -fsS \
|
||||||
|
--connect-timeout 5 \
|
||||||
|
--max-time 15 \
|
||||||
|
--retry 2 \
|
||||||
|
--retry-delay 2 \
|
||||||
|
--retry-all-errors \
|
||||||
|
-X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
|
||||||
-d "chat_id=${TG_CHANNEL}" \
|
-d "chat_id=${TG_CHANNEL}" \
|
||||||
--data-urlencode "text=${MSG}"
|
--data-urlencode "text=${MSG}" \
|
||||||
|
|| echo "Telegram notification failed; continue pipeline"
|
||||||
|
|||||||
Reference in New Issue
Block a user