diff options
| author | Michael Grote | 2024-09-27 13:02:19 +0200 |
|---|---|---|
| committer | Michael Grote | 2024-09-27 13:02:19 +0200 |
| commit | 79e331c3d8a18604c21a9455e2c07bd1ece05dac (patch) | |
| tree | 62bece6292677d060c3e8f30edc7de1b809fdcf8 | |
| parent | 6b5f72b8808e972971468e3c112d0f2815519d4d (diff) | |
ci: fix notification tasks
| -rw-r--r-- | .gitea/workflows/build.yaml | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 7da91be..5341249 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -25,17 +25,20 @@ jobs: # uses: sudo-bot/action-shellcheck@latest # with: # cli-args: "shell.sh" - - name: Send notification on error + - name: Send notification uses: dawidd6/action-send-mail@v3 - if: always() + if: failure() with: connection_url: smtp://docker10.mgrote.net:1025 secure: false ignore_cert: true to: michael.grote@posteo.de from: Gitea Actions <gitea@mgrote.net> - subject: "CI Error in ${{ env.GITHUB_REPOSITORY }}" - body: "Job of ${{ env.github.repository }} failed!" + subject: "CI ${{ job.status }} in ${{ github.repository }}" + body: | + Repo: ${{ github.repository }} + Job: ${{ github.action }} + Status: ${{ job.status }} build: needs: [gitleaks, hadolint] # shellcheck @@ -63,14 +66,17 @@ jobs: file: ./Dockerfile push: true tags: "registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:latest,registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.extract_branch.outputs.REPO_BRANCH }}" - - name: Send notification on error + - name: Send notification uses: dawidd6/action-send-mail@v3 - if: always() + if: failure() with: connection_url: smtp://docker10.mgrote.net:1025 secure: false ignore_cert: true to: michael.grote@posteo.de from: Gitea Actions <gitea@mgrote.net> - subject: "CI Error in ${{ env.GITHUB_REPOSITORY }}" - body: Job of ${{ env.github.repository }} failed! + subject: "CI ${{ job.status }} in ${{ github.repository }}" + body: | + Repo: ${{ github.repository }} + Job: ${{ github.action }} + Status: ${{ job.status }} |