email-report #570
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
name: Email Team Members | |
on: | |
repository_dispatch: | |
types: [ email-report ] | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
email-team: | |
runs-on: ubuntu-22.04 | |
name: Email Team Members | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME_CORP }} | |
aws-region: us-west-2 | |
- name: Get Results | |
id: get-results | |
run: aws s3api get-object --bucket="$BUCKET" --key="$KEY" results.log | |
env: | |
KEY: ${{ github.event.client_payload.key }} | |
BUCKET: ${{ github.event.client_payload.bucket }} | |
- name: Get Addresses | |
id: get-addresses | |
run: | | |
addresses="$TEAM" | |
if [ ! -z "$RECIPIENT" ]; then | |
addresses="[\"$RECIPIENT\"]" | |
fi | |
echo "addresses=$addresses" >> $GITHUB_OUTPUT | |
env: | |
RECIPIENT: ${{ github.event.client_payload.email_recipient }} | |
TEAM: '["${{ secrets.PERF_REPORTS_EMAIL_ADDRESS }}"]' | |
- name: Send Email | |
uses: ./.github/actions/ses-email-action | |
with: | |
template: ${{ github.event.client_payload.template }} | |
region: us-west-2 | |
version: ${{ github.event.client_payload.version }} | |
format: ${{ github.event.client_payload.noms_bin_format }} | |
toAddresses: ${{ steps.get-addresses.outputs.addresses }} | |
dataFile: ${{ format('{0}/results.log', github.workspace) }} |