-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send emails to the team on Nightly CI Failure (#14)
Reuses the Admin SDK's Send Email action along with Firebase's MailGun credentials to notify the team if the nightly CI fails.
- Loading branch information
1 parent
817f68e
commit 170dfbf
Showing
6 changed files
with
28,434 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Send Email GitHub Action | ||
|
||
This is a minimalistic GitHub Action for sending emails using the Mailgun API. | ||
Specify the Mailgun API key along with the Mailgun domain and message to | ||
be sent. | ||
|
||
## Inputs | ||
|
||
### `api-key` | ||
|
||
**Required** Mailgun API key. | ||
|
||
### `domain` | ||
|
||
**Required** Mailgun domain name. | ||
|
||
### `from` | ||
|
||
**Required** Sender's email address. Ex: 'Hello User <[email protected]>' (defaults to 'user@{domain}`). | ||
|
||
### `to` | ||
|
||
**Required** Recipient's email address. You can use commas to separate multiple recipients. | ||
|
||
### `cc` | ||
|
||
Email addresses to Cc. | ||
|
||
### `subject` | ||
|
||
**Required** Message subject. | ||
|
||
### `text` | ||
|
||
Text body of the message. | ||
|
||
### `html` | ||
|
||
HTML body of the message. | ||
|
||
## Example usage | ||
|
||
``` | ||
- name: Send Email | ||
uses: firebase/firebase-sdk-nextjs-tests/.github/actions/send-email | ||
with: | ||
api-key: ${{ secrets.MAILGUN_API_KEY }} | ||
domain: ${{ secrets.MAILGUN_DOMAIN }} | ||
from: 'User <[email protected]>' | ||
html: '<h1>Testing some Mailgun awesomness!</h1>' | ||
to: '[email protected]' | ||
``` | ||
|
||
## Implementation | ||
|
||
This Action uses the `mailgun.js` NPM package to send Emails. | ||
|
||
When making a code change remember to run `npm run pack` to rebuild the | ||
`dist/index.js` file which is the executable of this Action. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright 2024 Google Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: 'Send email Action' | ||
description: 'Send emails using Mailgun from GitHub Actions workflows.' | ||
inputs: | ||
api-key: | ||
description: Mailgun API key. | ||
required: true | ||
domain: | ||
description: Mailgun domain name. | ||
required: true | ||
from: | ||
description: Senders name and email address. | ||
required: true | ||
to: | ||
description: Recipient's email address. You can use commas to separate multiple recipients. | ||
required: true | ||
cc: | ||
description: Email addresses to Cc. | ||
required: false | ||
subject: | ||
description: Message subject. | ||
required: true | ||
text: | ||
description: Text body of the message. | ||
required: false | ||
html: | ||
description: HTML body of the message. | ||
required: false | ||
runs: | ||
using: 'node20' | ||
main: 'dist/index.js' |
Oops, something went wrong.