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 16
16
- uses : ' google-github-actions/auth@v0'
17
17
with :
18
18
credentials_json : ' ${{ secrets.JSSDK_ACTIONS_SA_KEY }}'
19
+
19
20
# create composite indexes with Terraform
20
21
- name : Setup Terraform
21
22
uses : hashicorp/setup-terraform@v2
29
30
if : github.event_name == 'pull_request'
30
31
run : |
31
32
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"
33
46
continue-on-error : true
47
+
34
48
- name : Set up Node (16)
35
49
uses : actions/setup-node@v3
36
50
with :
You can’t perform that action at this time.
0 commit comments