-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (36 loc) · 1.8 KB
/
jaen-sendgrid-email.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# SPDX-FileCopyrightText: Copyright © 2021 snek.at
# SPDX-License-Identifier: EUPL-1.2
#
# Use of this source code is governed by an EUPL-1.2 license that can be found
# in the LICENSE file at https://snek.at/license
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#name
name: Jaen SendGrid
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#on
on:
repository_dispatch:
types: [send_mail]
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobs
jobs:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_id
jaen-email:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on: ubuntu-latest
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idsteps
steps:
# https://help.github.com/en/articles/virtual-environments-for-github-actions#default-environment-variables
# https://github.com/actions/checkout
- name: Checkout 🛎️
uses: actions/[email protected]
with:
path: '.'
- name: SendGrid
uses: peter-evans/sendgrid-action@v1
env:
FIRST_NAME: ${{ github.event.client_payload.form_first_name }}
LAST_NAME: ${{ github.event.client_payload.form_last_name }}
TELEPHONE: ${{ github.event.client_payload.form_telephone }}
EMAIL: ${{ github.event.client_payload.from_email }}
SUBJECT: ${{ github.event.client_payload.subject }} ${{ github.event.client_payload.form_first_name }} ${{github.event.client_payload.form_last_name}}
MESSAGE: ${{ github.event.client_payload.html_message }}
PROJECT_LINK: ${{ github.event.client_payload.from_project_link }}
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}