From 3aa349928d7d978969f3a8f2749268962bfe83bf Mon Sep 17 00:00:00 2001 From: aboyko Date: Mon, 31 Jul 2023 16:11:40 -0400 Subject: [PATCH] [GHA-Build] debug clear cache script --- .github/scripts/clear-s3-caches.sh | 4 ++-- .github/workflows/clear_s3_cache.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/clear-s3-caches.sh b/.github/scripts/clear-s3-caches.sh index 52858298f..7f5283b05 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 --output json --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 f03b751d3..ce1043218 100644 --- a/.github/workflows/clear_s3_cache.yml +++ b/.github/workflows/clear_s3_cache.yml @@ -23,4 +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/*' ${{ github.workspace }}/.github/scripts/clear-s3-caches.sh ${{ inputs.path }}