diff --git a/.github/scripts/clear-s3-caches.sh b/.github/scripts/clear-s3-caches.sh index 7f5283b05..f42710fa3 100755 --- a/.github/scripts/clear-s3-caches.sh +++ b/.github/scripts/clear-s3-caches.sh @@ -1,6 +1,6 @@ s3_path=$1 -aws cloudfront create-invalidation --distribution-id ECAO9Q8651L8M --paths '/release/TOOLS/sts4-language-server-integrations/2023-07-31/*' -invalidation_json=`aws cloudfront create-invalidation --distribution-id ECAO9Q8651L8M --output json --paths "/${s3_path}/*"` +aws cloudfront create-invalidation --distribution-id ECAO9Q8651L8M --paths /release/TOOLS/sts4-language-server-integrations/2023-07-31/* +invalidation_json=`aws cloudfront create-invalidation --distribution-id ECAO9Q8651L8M --output json --paths /${s3_path}/*` echo "Invalidation response: ${invalidation_json}" invalidation_id=`echo $invalidation_json | jq -r '.Invalidation.Id'` invalidation_status=`echo $invalidation_json | jq -r '.Invalidation.Status'` diff --git a/.github/workflows/clear_s3_cache.yml b/.github/workflows/clear_s3_cache.yml index ce1043218..e514645a2 100644 --- a/.github/workflows/clear_s3_cache.yml +++ b/.github/workflows/clear_s3_cache.yml @@ -23,5 +23,5 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }} run: | - aws cloudfront create-invalidation --distribution-id ECAO9Q8651L8M --paths '/release/TOOLS/sts4-language-server-integrations/2023-07-31/*' + aws cloudfront create-invalidation --distribution-id ECAO9Q8651L8M --paths /release/TOOLS/sts4-language-server-integrations/2023-07-31/* ${{ github.workspace }}/.github/scripts/clear-s3-caches.sh ${{ inputs.path }}