I am attempting to migrate from Travis to Github Actions. One piece of functionality I have been unable to figure out how to migrate is:
Meaning, I want to send an email notification only when the build status changes from success to failure or vice-versa. Github Actions doesn't seem to have a way to look up the previous build status. Any ideas?
Hi @cowwoc ,
I am sorry to tell you that there is not a similar function in GitHub Actions to send notification when build status change.
In GitHub Actions, there is an option "Send notifications for failed workflows only" . The notification settings for GitHub Actions is in "https://github.com/settings/notifications" page. There is the document for "Notifications for workflow runs" : https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#notifica...
I am also currently migrating to GitHub Actions.
Is there a way to change the notification address for only one repository?
We have some tests, that are being executed periodically via GitHub Actions.
These Tests are hosted in their own repository and have their own CI pipeline.
If they fail, our whole team should get notified about the failure, not only the person who last changed the test repository.
Is there a way to archieve this behaviour?
Ideally, the team should also get notified, once tests start succeeding again, but as you have mentioned, this is currently not supported.
Hey @saltcreek-alex and @cowwoc
What we do in our company is just send notifications in our slack channel. We have our custom solution by you can use this freely available slack notifier https://github.com/marketplace/actions/action-slack
You can also search for slack notifiers under the marketplace to check out other options.
I think you misunderstood the question. We only want to receive notification when the build status changes states (from success to failure or vice-versa). We don't want to receive consecutive success, failure notifications.
Hey, @cowwoc oh you're right, I guess that's different.
I guess you can roll your own solution by accessing the actions API and compare the result of the last run. You can do that in the if (success) and if (fail) clause so that you'll only need to compare it with the last run before the current one.