mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-06 11:20:30 -05:00
/.github/{actions, workflows}: accept dataFile as input
This commit is contained in:
@@ -5,6 +5,10 @@ inputs:
|
||||
description: 'aws region'
|
||||
required: true
|
||||
default: ''
|
||||
dataFile:
|
||||
required: true
|
||||
description: 'path to email data file'
|
||||
default: ''
|
||||
toAddresses:
|
||||
description: 'json string list of to addresses'
|
||||
required: true
|
||||
|
||||
@@ -7,12 +7,16 @@ module.exports =
|
||||
|
||||
const core = __webpack_require__(53475);
|
||||
const aws = __webpack_require__(32197);
|
||||
const fs = __webpack_require__(35747);
|
||||
|
||||
const region = core.getInput('region');
|
||||
const dataFilePath = core.getInput('dataFile');
|
||||
const CcAddresses = JSON.parse(core.getInput('ccAddresses'));
|
||||
const ToAddresses = JSON.parse(core.getInput('toAddresses'));
|
||||
const ReplyToAddresses = JSON.parse(core.getInput('replyToAddresses'));
|
||||
|
||||
const data = fs.readFileSync(dataFilePath, { encoding: 'utf-8' });
|
||||
|
||||
// Set the region
|
||||
aws.config.update({ region });
|
||||
|
||||
@@ -26,7 +30,7 @@ const params = {
|
||||
Body: { /* required */
|
||||
Html: {
|
||||
Charset: "UTF-8",
|
||||
Data: "This is the body of the test email"
|
||||
Data: `This is the first part of the email.\n ${data}`
|
||||
},
|
||||
// Text: {
|
||||
// Charset: "UTF-8",
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const core = require('@actions/core');
|
||||
const aws = require('aws-sdk');
|
||||
const fs = require('fs');
|
||||
|
||||
const region = core.getInput('region');
|
||||
const dataFilePath = core.getInput('dataFile');
|
||||
const CcAddresses = JSON.parse(core.getInput('ccAddresses'));
|
||||
const ToAddresses = JSON.parse(core.getInput('toAddresses'));
|
||||
const ReplyToAddresses = JSON.parse(core.getInput('replyToAddresses'));
|
||||
|
||||
const data = fs.readFileSync(dataFilePath, { encoding: 'utf-8' });
|
||||
|
||||
// Set the region
|
||||
aws.config.update({ region });
|
||||
|
||||
@@ -19,7 +23,7 @@ const params = {
|
||||
Body: { /* required */
|
||||
Html: {
|
||||
Charset: "UTF-8",
|
||||
Data: "This is the body of the test email"
|
||||
Data: `This is the first part of the email.\n ${data}`
|
||||
},
|
||||
// Text: {
|
||||
// Charset: "UTF-8",
|
||||
|
||||
@@ -15,8 +15,16 @@ jobs:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-west-2
|
||||
- name: Get benchmark results
|
||||
id: get-results
|
||||
run: |
|
||||
echo "Get benchmark results here: $KEY"
|
||||
aws s3api get-object --bucket=performance-benchmarking-github-actions-results --key="$KEY" results.log
|
||||
env:
|
||||
KEY: '2021/01/15/coffeegoddd/87d9626ed0eca11bb602ff820c74db4cf918d578/comparison-results.log'
|
||||
- name: Send Email
|
||||
uses: ./.github/actions/ses-email-action
|
||||
with:
|
||||
region: us-west-2
|
||||
toAddresses: '["dustin@dolthub.com"]'
|
||||
dataFile: ${{ format('{0}/results.log', github.workspace) }}
|
||||
|
||||
Reference in New Issue
Block a user