diff --git a/.github/workflows/terraform-apply.yml b/.github/workflows/terraform-apply.yml index ff526518..dea50b73 100644 --- a/.github/workflows/terraform-apply.yml +++ b/.github/workflows/terraform-apply.yml @@ -155,7 +155,7 @@ jobs: AWS_SESSION_TOKEN: "${{ steps.decrypt-aws-session-token.outputs.out }}" - name: Invalidate CloudFront distribution cache if: success() && inputs.clear-web-cache - run: + run: | DISTRIBUTION_ID=$(terraform output -json | jq .web_cloudfront_distribution_id.value) aws cloudfront create-invalidation --paths '/*' --distribution-id $DISTRIBUTION_ID env: