Skip to content

Commit 5e2259e

Browse files
committed
update pull_request.yml
1 parent 9399a5a commit 5e2259e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/pull_requests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ jobs:
3636
for f in ${folders//,/ }
3737
do
3838
f=$(echo $f | xargs echo -n)
39-
(echo "===> Terraform fmt checking in" $f && terrafmt diff $f --check) || error=true
39+
(echo "===> Terrafmt diff checking in" $f && terrafmt diff $f --check) || error=true
4040
if ${error}; then
41-
echo "${error}"
42-
echo "Some Terraform codes has not been formated, and please running terraform fmt --recursive command before pushing"
41+
echo -e "\033[1m[ERROR]\033[0m: Some quickstarts codes has not been formated, and please running terraform fmt --recursive command before pushing."
4342
exit 1
4443
fi
4544
done
@@ -67,4 +66,4 @@ jobs:
6766
wget -q https://releases.hashicorp.com/terraform/1.6.0/terraform_1.6.0_linux_amd64.zip
6867
unzip terraform_1.6.0_linux_amd64.zip -d /usr/local/bin/
6968
fi
70-
sh scripts/terraform-validate.sh
69+
sh scripts/terraform-validate.sh CHANGED_FOLDERS=${CHANGED_FOLDERS}

0 commit comments

Comments
 (0)