From 21dc1730efa5f7427855dfb1c434dadbac84b615 Mon Sep 17 00:00:00 2001 From: Anton Alekseev Date: Fri, 12 Jan 2024 12:20:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=83=D0=B2=D0=B5=D0=B4=D0=BE=D0=BC=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B2=20=D1=82=D0=B5=D0=BB=D0=B5=D0=B3=D1=83=20=D0=BE?= =?UTF-8?q?=20=D0=B7=D0=B0=D1=84=D0=B5=D0=B9=D0=BB=D0=B5=D0=BD=D0=BD=D0=BE?= =?UTF-8?q?=D0=BC=20=D0=BF=D0=B0=D0=B9=D0=BF=D0=BB=D0=B0=D0=B9=D0=BD=D0=B5?= =?UTF-8?q?=20(#1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add telegram notification example * add telegram notification for failed pipeline * add gihub action env * add gihub action path env * add gihub workflow env * add github run id env * fix failed pipeline * enable cron * update notify message * enable cron --- .github/workflows/modules.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/modules.yml b/.github/workflows/modules.yml index 09d2ab1..6b24bbe 100644 --- a/.github/workflows/modules.yml +++ b/.github/workflows/modules.yml @@ -45,4 +45,19 @@ jobs: run: terraform apply -auto-approve - name: Terraform destroy - run: terraform destroy -auto-approve \ No newline at end of file + run: terraform destroy -auto-approve + + - name: Telegram notify if job was failed + if: ${{ failure() }} + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} + message: | + -= GITHUB public repository selectel/selectel-infra-examples =- + Terraform modules build pipeline was failed + 🚨 Critical + Не катится пайпа, необходимо принять меры, возможно внутренние пайпы с terraform так же не будут катиться. + + ⚡️Workflow: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + 🔥 See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}