From 78cd70b8ff823ba54dd1821cef0cdca015662cb1 Mon Sep 17 00:00:00 2001 From: Mengxin Zhu <843303+zxkane@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:47:32 +0800 Subject: [PATCH] chore: publish templates to s3 in release workflow --- .github/workflows/release.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f61d805..e272a55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,4 +32,27 @@ jobs: - name: Build and Publish run: |- cd scripts - bash push-to-ecr.sh \ No newline at end of file + bash push-to-ecr.sh + cfn_templates: + runs-on: ubuntu-latest + permissions: + id-token: write + needs: ecr_images + env: + iam_role_to_assume: ${{ secrets.ROLE_ARN }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Configure AWS Credentials + if: ${{ env.iam_role_to_assume != '' }} + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.iam_role_to_assume }} + aws-region: us-east-1 + - name: Copy Deployment Templates to S3 + env: + S3_BUCKET: ${{ secrets.ASSET_BUCKET }} + S3_PREFIX: bedrock-access-gateway/latest/ + run: aws s3 sync deployment/ s3://$S3_BUCKET/$S3_PREFIX --acl public-read \ No newline at end of file