I have set up a Github action to send an email on failure (for integration tests) and I'd like to send another one to notify that it recovered; for that I need to know if the previous run failed but the current one succeeded.
This is the code for the failure:
(...)
- name: Send mail if failed
if: ${{ failure() }}
uses: juanformoso/action-send-mail@1
with:
(...)
Is there a way to accomplish what I need? something like ${{ if success_but_previous_failed() }}?
EDIT: I mean between workflow "runs", this is the situation I want to detect:
The last run should send a "tests recovered" mail
