ci: fix notification tasks
All checks were successful
lint, build and push / lint (push) Successful in 10s
lint, build and push / build (push) Successful in 25s

This commit is contained in:
Michael Grote 2024-09-27 13:02:49 +02:00
parent 9af12c71c4
commit 4980a57bd5

View file

@ -25,17 +25,20 @@ jobs:
# uses: sudo-bot/action-shellcheck@latest # uses: sudo-bot/action-shellcheck@latest
# with: # with:
# cli-args: "shell.sh" # cli-args: "shell.sh"
- name: Send notification on error - name: Send notification
uses: dawidd6/action-send-mail@v3 uses: dawidd6/action-send-mail@v3
if: always() if: failure()
with: with:
connection_url: smtp://docker10.mgrote.net:1025 connection_url: smtp://docker10.mgrote.net:1025
secure: false secure: false
ignore_cert: true ignore_cert: true
to: michael.grote@posteo.de to: michael.grote@posteo.de
from: Gitea Actions <gitea@mgrote.net> from: Gitea Actions <gitea@mgrote.net>
subject: "CI Error in ${{ env.GITHUB_REPOSITORY }}" subject: "CI ${{ job.status }} in ${{ github.repository }}"
body: "Job of ${{ env.github.repository }} failed!" body: |
Repo: ${{ github.repository }}
Job: ${{ github.action }}
Status: ${{ job.status }}
build: build:
needs: [gitleaks, hadolint] # shellcheck needs: [gitleaks, hadolint] # shellcheck
@ -63,14 +66,17 @@ jobs:
file: ./Dockerfile file: ./Dockerfile
push: true 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 }}" 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 uses: dawidd6/action-send-mail@v3
if: always() if: failure()
with: with:
connection_url: smtp://docker10.mgrote.net:1025 connection_url: smtp://docker10.mgrote.net:1025
secure: false secure: false
ignore_cert: true ignore_cert: true
to: michael.grote@posteo.de to: michael.grote@posteo.de
from: Gitea Actions <gitea@mgrote.net> from: Gitea Actions <gitea@mgrote.net>
subject: "CI Error in ${{ env.GITHUB_REPOSITORY }}" subject: "CI ${{ job.status }} in ${{ github.repository }}"
body: Job of ${{ env.github.repository }} failed! body: |
Repo: ${{ github.repository }}
Job: ${{ github.action }}
Status: ${{ job.status }}