From a71cc36c7260789d1e39acb82c5f087c0e2a38b7 Mon Sep 17 00:00:00 2001 From: Scott Prutton Date: Mon, 29 Jul 2024 12:27:20 -0400 Subject: [PATCH] fix: cloudfront dist id from secret instead of by name --- .github/workflows/deploy-service.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy-service.yml b/.github/workflows/deploy-service.yml index 7ceee91e59..5d830dd146 100644 --- a/.github/workflows/deploy-service.yml +++ b/.github/workflows/deploy-service.yml @@ -62,8 +62,7 @@ jobs: - name: Invalidate web cache if: ${{ inputs.service == 'web' }} run: | - ENV=${{ inputs.environment }} - DIST_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Comment=='$ENV-cdn'].Id | [0]" --output text) + DIST_ID=${{ secrets.CLOUDFRONT_DIST_ID }} # Create a CloudFront invalidation for all objects (/*) invalidation_id=$(aws cloudfront create-invalidation --distribution-id $DIST_ID --paths "/*" --query 'Invalidation.Id' --output text) # Check the status of the invalidation until it's completed