File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1616 - uses : ' google-github-actions/auth@v0'
1717 with :
1818 credentials_json : ' ${{ secrets.JSSDK_ACTIONS_SA_KEY }}'
19+
1920 # create composite indexes with Terraform
2021 - name : Setup Terraform
2122 uses : hashicorp/setup-terraform@v2
2930 if : github.event_name == 'pull_request'
3031 run : |
3132 cd packages/firestore
32- terraform apply -var-file=../../config/project.json -auto-approve &> /dev/null
33+
34+ # Define a temporary file, redirect both stdout and stderr to it
35+ output_file=$(mktemp)
36+ if ! terraform apply -var-file=../../config/project.json -auto-approve > "$output_file" 2>&1 ; then
37+ cat "$output_file"
38+ if cat "$output_file" | grep -q "index already exists"; then
39+ echo "==================================================================================="
40+ echo -e "\e[93m\e[1mTerraform apply failed due to index already exists; We can safely ignore this error.\e[0m"
41+ echo "==================================================================================="
42+ fi
43+ exit 1
44+ fi
45+ rm -f "$output_file"
3346 continue-on-error : true
47+
3448 - name : Set up Node (16)
3549 uses : actions/setup-node@v3
3650 with :
You can’t perform that action at this time.
0 commit comments