This is a simple GitHub action that allows to send emails when a GitHub Check Suite completes. This requires a few environment variables:
APP_NAME
- Name of an application for which to send emails for.MAIL_FROM
- email address to send emails from.MAIL_HOST
- SMTP host to send emails to.MAIL_USERNAME
andMAIL_PASSWORD
- username and password to authorize with the SMTP server.GITHUB_TOKEN
- is standard environment variable for GitHub actions.- optional
IGNORED_CONCLUSIONS
to secify conclusions to report. By default onlysuccess
andneutral
checks are ignored.
Now your action can look liker this in your .github/main.workflow
workflow file:
action "Cirrus CI Email" {
uses = "docker://cirrusactions/email:latest"
env = {
APP_NAME = "Cirrus CI"
}
secrets = ["GITHUB_TOKEN", "MAIL_FROM", "MAIL_HOST", "MAIL_USERNAME", "MAIL_PASSWORD"]
}