From c21dc02955fa0a608f4b193e97ffe68282f539f8 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index cb6f4e1..60e4c49 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -20,6 +20,7 @@ jobs: - name: Set timestamp and release version run: | + bgbcvdc echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV git fetch --prune --unshallow --tags --force echo "RELEASE_VERSION=$(git describe --always --dirty='--modified')" >> $GITHUB_ENV @@ -91,3 +92,12 @@ 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 }} + message: | + ${{ gitea.job }} job of ${{ gitea.repository }} has ${{ job.status }}