From 7982db4f1588d015279730c5f92deae8964a1662 Mon Sep 17 00:00:00 2001 From: Stepan Lavrentev Date: Tue, 2 Jul 2024 19:52:24 +0300 Subject: [PATCH] add message if failure --- .../workflows/support_generic_ledger_app_check.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/support_generic_ledger_app_check.yaml b/.github/workflows/support_generic_ledger_app_check.yaml index 12bcf282b..c39008605 100644 --- a/.github/workflows/support_generic_ledger_app_check.yaml +++ b/.github/workflows/support_generic_ledger_app_check.yaml @@ -44,7 +44,7 @@ jobs: pr-base: master - name: Send Telegram Notification - if: steps.make-pr.outputs.pr-url != '' + if: success() && steps.make-pr.outputs.pr-url != '' uses: appleboy/telegram-action@master with: to: ${{ secrets.TELEGRAM_TO }} @@ -53,3 +53,14 @@ jobs: 📒 New networks have been added to Generic Ledger App! PR: ${{ steps.make-pr.outputs.pr-url }} + + - name: Send Telegram Notification on Failure + if: failure() + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} + message: | + ❌ Workflow failed for Generic Ledger App update! + + run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}