From 6bedf95348ea854c1627969a724e2abb9803c4d1 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Tue, 22 Apr 2025 17:18:08 +0200 Subject: [PATCH] Notify on build failure --- .gitea/workflows/build.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index cb6f4e1..543859b 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -91,3 +91,18 @@ jobs: flux tag artifact oci://${{ env.OCI_REPO }}/manifests:${{ gitea.head_ref || gitea.ref_name }} \ $(echo "${{ steps.meta.outputs.tags }}" | sed -e 's/^.*:/--tag /') + + - name: Notify build status + if: failure() + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} + # TODO: Escaping issues need to be solved first + # format: markdown + message: | + 🚨 *BUILD FAILED!* + ${{ gitea.repository }} (#${{ gitea.run_number }}) + + [${{ gitea.ref_name }} @ ${{ gitea.sha }}] + > ${{ gitea.event.head_commit.message }}