test sync bucket

This commit is contained in:
neil 2022-11-19 15:04:01 +08:00
parent e6e08d5bb5
commit d64dd5e8fd

View file

@ -92,9 +92,17 @@ jobs:
# working-directory: .cdk # working-directory: .cdk
- name: get cdk bucket - name: get cdk bucket
id: DEPLOY_BUCKET
run: | 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 # sync images from www.tea.xyz/Images/packages to wherever bucket you are
# - run: | # - run: |