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

aws sdk upgrade #7062

Merged
merged 3 commits into from
Nov 29, 2023
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: 3 additions & 6 deletions .github/actions/ses-email-action/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const core = require('@actions/core');
const aws = require('aws-sdk');
const { SES } = require("@aws-sdk/client-ses");

const fs = require('fs');

const region = core.getInput('region');
Expand All @@ -26,9 +27,6 @@ const templated = {
body,
};

// Set the region
aws.config.update({ region });

// Create sendEmail params
const params = {
Destination: { /* required */
Expand All @@ -44,8 +42,7 @@ const params = {
console.log(params)

// Create the promise and SES service object
// const sendPromise = new aws.SES({apiVersion: '2010-12-01'}).sendEmail(params).promise();
const sendPromise = new aws.SES({apiVersion: '2010-12-01'}).sendTemplatedEmail(params).promise();
const sendPromise = new SES({region}).sendTemplatedEmail(params);

// Handle promise's fulfilled/rejected states
sendPromise
Expand Down
Loading