How to do it for file contains?
In this case, I run automated tests, if the framework fails, I continue the workflow with continue-on-error.
I am trying to send notifications to Slack only on failure.
I can do it on all cases currently, but I want to send the notification only if test reports contain the word Failed at least once.
Thanks
Comment
In the sample code of this blog post it uses:
script/check-links.js broken_links.md
And that script will create the file if and only if there *are* broken links.
So you can write something similar yourself.
E.g.
script/did-it-fail.js it-failed.log
But another option is simpler. If the tests failed, that step of the Actions workflow will exit non-zero.
Example https://github.com/github/docs/blob/44d96b002ba8aeb32a33a8b1d31ef7919b09bd5e/.github/workflows/orphaned-assets-check.yml#L71-L78
Parent comment
How to do it for file contains? In this case, I run automated tests, if the framework fails, I continue the workflow with continue-on-error. I am trying to send notifications to Slack only on failure. I can do it on all cases currently, but I want to send the notification only if test reports contain the word Failed at least once. Thanks