Skip to content
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

chore: Fix bug in send-email action code #1214

Merged
merged 2 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/actions/send-email/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion .github/actions/send-email/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@ function sendEmail(config) {
});

return mg.messages
.create(domain, config)
.create(config.domain, {
from: config.from,
to: config.to,
cc: config.cc,
subject: config.subject,
text: config.text,
html: config.html,
})
.then((resp) => {
core.setOutput('response', resp.message);
return;
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ name: Nightly Builds

on:
# Runs every day at 06:00 AM (PT) and 08:00 PM (PT) / 04:00 AM (UTC) and 02:00 PM (UTC)
# or on 'firebase_build' repository dispatch event.
schedule:
- cron: "0 4,14 * * *"
repository_dispatch:
types: [firebase_build]

jobs:
nightly:
Expand Down Expand Up @@ -75,11 +78,11 @@ jobs:
domain: ${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}
from: 'GitHub <admin-github@${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}>'
to: ${{ secrets.FIREBASE_ADMIN_GITHUB_EMAIL }}
subject: '[${{github.repository}}] Nightly build failed!'
subject: 'Nightly build ${{github.run_id}} of ${{github.repository}} failed!'
html: >
<b>Nightly workflow failed on: ${{github.repository}}</b>
<b>Nightly workflow ${{github.run_id}} failed on: ${{github.repository}}</b>
<br /><br />Navigate to the
<a href="https://github.com/firebase/firebase-admin-node/actions">failed workflow</a>.
<a href="https://github.com/firebase/firebase-admin-node/actions/runs/${{github.run_id}}">failed workflow</a>.
continue-on-error: true

- name: Send email on cancelled
Expand All @@ -90,9 +93,9 @@ jobs:
domain: ${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}
from: 'GitHub <admin-github@${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}>'
to: ${{ secrets.FIREBASE_ADMIN_GITHUB_EMAIL }}
subject: '[${{github.repository}}] Nightly build got cancelled!'
subject: 'Nightly build ${{github.run_id}} of ${{github.repository}} cancelled!'
html: >
<b>Nightly workflow cancelled on: ${{github.repository}}</b>
<b>Nightly workflow ${{github.run_id}} cancelled on: ${{github.repository}}</b>
<br /><br />Navigate to the
<a href="https://github.com/firebase/firebase-admin-node/actions">cancelled workflow</a>.
<a href="https://github.com/firebase/firebase-admin-node/actions/runs/${{github.run_id}}">cancelled workflow</a>.
continue-on-error: true