File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,11 @@ jobs:
8585 - name : Approve a PR if not already approved
8686 run : |
8787 # Sets the upstream metadata for `gh pr status`
88- gh pr checkout {"$ PR_URL"}
88+ gh pr checkout "${ PR_URL}"
8989
9090 if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ];
9191 then
92- gh pr review --approve "$PR_URL"
92+ gh pr review --approve "${ PR_URL} "
9393 else
9494 echo "PR already approved, skipping additional approvals to minimize emails/notification noise.";
9595 fi
Original file line number Diff line number Diff line change 4545 - name : Determine Terraform version
4646 id : terraform-version
4747 run : |
48- cat .review_apps/.terraform-version | xargs printf "TF_VERSION=%s " >> "$GITHUB_OUTPUT"
48+ echo "TF_VERSION=$(< .review_apps/.terraform-version) " >> "$GITHUB_OUTPUT"
4949
5050 - uses : hashicorp/setup-terraform@v3
5151 with :
@@ -64,10 +64,12 @@ jobs:
6464 -no-color \
6565 -auto-approve
6666
67- echo "REVIEW_APP_URL=$(terraform output -raw review_app_url)" >> "$GITHUB_OUTPUT"
68- echo "ADMIN_APP_URL=$(terraform output -raw admin_app_url)" >> "$GITHUB_OUTPUT"
69- echo "ECS_CLUSTER_ID=$(terraform output -raw review_app_ecs_cluster_id)" >> "$GITHUB_OUTPUT"
70- echo "ECS_SERVICE_NAME=$(terraform output -raw review_app_ecs_service_name)" >> "$GITHUB_OUTPUT"
67+ {
68+ echo "REVIEW_APP_URL=$(terraform output -raw review_app_url)"
69+ "ADMIN_APP_URL=$(terraform output -raw admin_app_url)"
70+ "ECS_CLUSTER_ID=$(terraform output -raw review_app_ecs_cluster_id)"
71+ "ECS_SERVICE_NAME=$(terraform output -raw review_app_ecs_service_name)"
72+ } >> "$GITHUB_OUTPUT"
7173
7274 - name : Wait for AWS ECS deployments to finish
7375 run : |
@@ -102,6 +104,8 @@ jobs:
102104 $COMMENT_MARKER
103105 EOF
104106
107+ # shellcheck disable=SC2016
108+ # `jq` uses single-quote characters on Unix shells
105109 old_comment_ids=$(gh api "repos/{owner}/{repo}/issues/${{github.event.pull_request.number}}/comments" --jq 'map(select((.user.login == "github-actions[bot]") and (.body | endswith($ENV.COMMENT_MARKER + "\n")))) | .[].id')
106110 for comment_id in $old_comment_ids; do
107111 gh api -X DELETE "repos/{owner}/{repo}/issues/comments/${comment_id}"
Original file line number Diff line number Diff line change 1818 - name : Determine Terraform version
1919 id : terraform-version
2020 run : |
21- cat .review_apps/.terraform-version | xargs printf "TF_VERSION=%s " >> "$GITHUB_OUTPUT"
21+ echo "TF_VERSION=$(< .review_apps/.terraform-version) " >> "$GITHUB_OUTPUT"
2222
2323 - uses : hashicorp/setup-terraform@v3
2424 with :
You can’t perform that action at this time.
0 commit comments