Closed phun-ky closed 6 months ago
Hi @phun-ky,
If I'm understanding correctly, the run you linked is for a pull request.
The condition you have in your workflow configuration here is:
if: failure() && github.event.pull_request == null
The second part of that expression returns false
if the triggering event is a pull request. If you want a notification even for a pull request event, you should change that conditional expression appropriately.
I have it that way in the example for this Action because my typical use case is that I want the notification on test failures when running on the main branch that are triggered by pushes and schedule, but not on test failures on pull requests.
hm, ok. what should that condition look like then? is it sufficient to just remove the second part of the conditional?
Yes, if you remove the second part of the conditional, then with only failure()
that step will trigger if any previous step or job in the workflow failed, no matter the type.
It looks like there's some room for improved documentation about this. I'm going to rename this issue to reflect that.
Updated documentation in the readme with #107
Maybe i'm doing something wrong here, but the job is always skipped on failure:
https://github.com/entur/products-models/actions/runs/7841886029