Skip to content

Commit

Permalink
Merge pull request #4245 from systeminit/fix/cloudfront
Browse files Browse the repository at this point in the history
fix: cloudfront dist id from secret instead of by name
  • Loading branch information
sprutton1 authored Jul 29, 2024
2 parents 062774d + a71cc36 commit a0f2c59
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0f2c59

Please sign in to comment.