Skip to content

Publish CloudFormation templates to AWS S3 #9

Publish CloudFormation templates to AWS S3

Publish CloudFormation templates to AWS S3 #9

name: Publish CloudFormation templates to AWS S3
on:
# workflow_call:
# inputs:
# push:
# branches:
# - main
# paths:
# - './packages/artillery/lib/platform/aws/iam-cf-templates/**'
workflow_dispatch:
jobs:
put-cloudformation-templates:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
env:
SHOW_STACK_TRACE: true
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ASSET_UPLOAD_ROLE_ARN }}
role-session-name: OIDCSession
mask-aws-account-id: true
- name: Update IAM CloudFormation templates
run: |
aws s3 cp --acl public-read ./packages/artillery/lib/platform/aws/iam-cf-templates/aws-iam-fargate-cf-template.yml s3://artilleryio-cf-templates/aws-iam-fargate-cf-template.yml
aws s3 cp --acl public-read ./packages/artillery/lib/platform/aws/iam-cf-templates/aws-iam-lambda-cf-template.yml s3://artilleryio-cf-templates/aws-iam-lambda-cf-template.yml