Skitionek / notify-microsoft-teams

Github action to send comprehensive raport to Microsoft Teams
68 stars 31 forks source link

Notification always shows "Success!" #30

Closed lourenco00 closed 1 year ago

lourenco00 commented 2 years ago

imagem As you can see, even though one of the steps before this job having failed the notification appears as "Success!" and with green color. How can I fix this to when there's a job that fails appear "failure" and red color? I'll paste here my code: imagem

vml-loshea commented 2 years ago

If I understand how this tool works, you are getting a success because the job containing the notification (named success I think) always runs, and that job succeeds. I think the notification tool only reports as success or failure the results of the job it is included in. So if you want it to report the job status based on the results of the deployAnsible job, you need to put the skitionek/notify-microsoft-teams step in the deployAnsible job.

I don't see anywhere else where the code decides success or failure if any of the needs jobs are failures.

Skitionek commented 1 year ago

@vml-loshea that's right