From d64dd5e8fde763548336f2a845b57d4b2e02630d Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 19 Nov 2022 15:04:01 +0800 Subject: [PATCH] test sync bucket --- .github/workflows/staging.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 85e557d..5e3540b 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -92,9 +92,17 @@ jobs: # working-directory: .cdk - name: get cdk bucket + id: DEPLOY_BUCKET run: | - aws s3 ls | grep $(echo teaxyz-pr-$GITHUB_REF_SLUG_URL | sed "s/-merge//") + BUCKET=$(aws s3 ls | grep $(echo teaxyz-pr-$GITHUB_REF_SLUG_URL | sed "s/-merge//") | grep -o '[^ ]*$') + echo "bucket=$BUCKET" >> $GITHUB_OUTPUT + - name: sync package images from prod to preview bucket + run: | + aws s3 sync s3://www.tea.xyz/Images/packages \ + s3://$NEW_BUCKET/Images/packages + env: + NEW_BUCKET: ${{ steps.DEPLOY_BUCKET.outputs.bucket }} # sync images from www.tea.xyz/Images/packages to wherever bucket you are # - run: |