Skip to content

Commit e2f3fe0

Browse files
authored
chore: Merged main branch into modular-sdk (#1235)
* chore: Merged main branch into modular-sdk * Adding missing commit from #1148 * fix: Removed redundant comment
1 parent 9ffb196 commit e2f3fe0

40 files changed

+5227
-1013
lines changed

.github/actions/send-email/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Send Email GitHub Action
2+
3+
This is a minimalistic GitHub Action for sending emails using the Mailgun API.
4+
Specify the Mailgun API key along with the Mailgun domain and message to
5+
be sent.
6+
7+
## Inputs
8+
9+
### `api-key`
10+
11+
**Required** Mailgun API key.
12+
13+
### `domain`
14+
15+
**Required** Mailgun domain name.
16+
17+
### `from`
18+
19+
**Required** Sender's email address. Ex: 'Hello User <[email protected]>' (defaults to 'user@{domain}`).
20+
21+
### `to`
22+
23+
**Required** Recipient's email address. You can use commas to separate multiple recipients.
24+
25+
### `cc`
26+
27+
Email addresses to Cc.
28+
29+
### `subject`
30+
31+
**Required** Message subject.
32+
33+
### `text`
34+
35+
Text body of the message.
36+
37+
### `html`
38+
39+
HTML body of the message.
40+
41+
## Example usage
42+
43+
```
44+
- name: Send Email
45+
uses: firebase/firebase-admin-node/.github/actions/send-email
46+
with:
47+
api-key: ${{ secrets.MAILGUN_API_KEY }}
48+
domain: ${{ secrets.MAILGUN_DOMAIN }}
49+
from: 'User <[email protected]>'
50+
html: '<h1>Testing some Mailgun awesomness!</h1>'
51+
52+
```
53+
54+
## Implementation
55+
56+
This Action uses the `mailgun.js` NPM package to send Emails.
57+
58+
When making a code change remember to run `npm run pack` to rebuild the
59+
`dist/index.js` file which is the executable of this Action.

.github/actions/send-email/action.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright 2021 Google Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: 'Send email Action'
16+
description: 'Send emails using Mailgun from GitHub Actions workflows.'
17+
inputs:
18+
api-key:
19+
description: Mailgun API key.
20+
required: true
21+
domain:
22+
description: Mailgun domain name.
23+
required: true
24+
from:
25+
description: Senders name and email address.
26+
required: true
27+
to:
28+
description: Recipient's email address. You can use commas to separate multiple recipients.
29+
required: true
30+
cc:
31+
description: Email addresses to Cc.
32+
required: false
33+
subject:
34+
description: Message subject.
35+
required: true
36+
text:
37+
description: Text body of the message.
38+
required: false
39+
html:
40+
description: HTML body of the message.
41+
required: false
42+
runs:
43+
using: 'node12'
44+
main: 'dist/index.js'

0 commit comments

Comments
 (0)