-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mic 4383/4384/notify if actions fail #334
Conversation
@@ -50,3 +50,22 @@ jobs: | |||
- name: Doctest | |||
run: | | |||
make doctest -C docs/ | |||
- name: Send mail | |||
# Notify when cron job fails | |||
if: (github.event_name == 'schedule' && failure()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its weird I can't check failure by job.status == 'failure'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a more pointed question if anyone knows is I don't understand when I have to use something like ${{ github.job }} instead of just github.event_name
server_address: smtp.gmail.com | ||
server_port: 465 | ||
# user credentials | ||
username: ${{ secrets.NOTIFY_EMAIL }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've currently created a new gmail account [email protected] that sends the email.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I would need to regenerate the password since I didn't save it and would need to do this for all repositories we want it in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussions today, I will update the secrets email to be the vivarium dev email when we want to implement this in all repositories as that will be a sweeping change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you update the email to [email protected]? If not, I think you should do that now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I have - this currently won't work because I will need to set up the secrets password with the the app password in that email account through gmail.
.github/workflows/build.yml
Outdated
# email body as text | ||
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }} | ||
# comma-separated string, send email to | ||
to: [email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need to be replaced with vivarium-dev email and then forward the email to all code owners or we would need to comma separate all code owners emails here.
server_address: smtp.gmail.com | ||
server_port: 465 | ||
# user credentials | ||
username: ${{ secrets.NOTIFY_EMAIL }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you update the email to [email protected]? If not, I think you should do that now.
.github/workflows/deploy.yml
Outdated
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }} | ||
# comma-separated string, send email to | ||
to: [email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You missed this email address change.
Mic-4383/4484/notify if actions fail
Sends email notification on actions failures
-Adds functionality to send notifications via email when a cron or deploy workflow actions fails.
Testing
-Made new email to use to send notifications through action
-Recei