@@ -119,11 +119,9 @@ jobs:
119119 same_repo="true"
120120 fi
121121
122- {
123- echo "PR_NUMBER=$pr_number"
124- echo "APP_NAME=${REVIEW_APP_PREFIX}-$pr_number"
125- echo "PR_SHA=$pr_sha"
126- } >> "$GITHUB_ENV"
122+ echo "PR_NUMBER=$pr_number" >> "$GITHUB_ENV"
123+ echo "APP_NAME=${REVIEW_APP_PREFIX}-$pr_number" >> "$GITHUB_ENV"
124+ echo "PR_SHA=$pr_sha" >> "$GITHUB_ENV"
127125 echo "same_repo=${same_repo}" >> "$GITHUB_OUTPUT"
128126
129127 - name : Validate review app deployment source
@@ -305,9 +303,11 @@ jobs:
305303 - name : Update PR comment with build status
306304 if : steps.config.outputs.ready == 'true' && steps.source.outputs.allowed == 'true' && (steps.check-app.outputs.exists == 'true' || steps.setup-review-app.outcome == 'success')
307305 uses : actions/github-script@v7
306+ env :
307+ COMMENT_ID : ${{ steps.create-comment.outputs.comment-id }}
308308 with :
309309 script : |
310- const commentId = Number("${{ steps.create-comment.outputs.comment-id }}" );
310+ const commentId = Number(process.env.COMMENT_ID );
311311 if (!Number.isFinite(commentId) || commentId <= 0) {
312312 core.warning("Skipping PR comment update because no comment id was created.");
313313 return;
@@ -344,9 +344,11 @@ jobs:
344344 - name : Update PR comment with deploy status
345345 if : steps.config.outputs.ready == 'true' && steps.source.outputs.allowed == 'true' && (steps.check-app.outputs.exists == 'true' || steps.setup-review-app.outcome == 'success')
346346 uses : actions/github-script@v7
347+ env :
348+ COMMENT_ID : ${{ steps.create-comment.outputs.comment-id }}
347349 with :
348350 script : |
349- const commentId = Number("${{ steps.create-comment.outputs.comment-id }}" );
351+ const commentId = Number(process.env.COMMENT_ID );
350352 if (!Number.isFinite(commentId) || commentId <= 0) {
351353 core.warning("Skipping PR comment update because no comment id was created.");
352354 return;
@@ -398,12 +400,17 @@ jobs:
398400 - name : Finalize deployment status
399401 if : always() && steps.config.outputs.ready == 'true' && steps.source.outputs.allowed == 'true' && (steps.check-app.outputs.exists == 'true' || steps.setup-review-app.outcome == 'success')
400402 uses : actions/github-script@v7
403+ env :
404+ COMMENT_ID : ${{ steps.create-comment.outputs.comment-id }}
405+ DEPLOYMENT_ID : ${{ steps.init-deployment.outputs.result }}
406+ APP_URL : ${{ steps.workload.outputs.workload_url }}
407+ JOB_STATUS : ${{ job.status }}
401408 with :
402409 script : |
403- const commentId = Number("${{ steps.create-comment.outputs.comment-id }}" );
404- const deploymentId = "${{ steps.init-deployment.outputs.result }}" ;
405- const appUrl = "${{ steps.workload.outputs.workload_url }}" ;
406- const success = "${{ job.status }}" === "success";
410+ const commentId = Number(process.env.COMMENT_ID );
411+ const deploymentId = process.env.DEPLOYMENT_ID ;
412+ const appUrl = process.env.APP_URL ;
413+ const success = process.env.JOB_STATUS === "success";
407414
408415 if (deploymentId) {
409416 await github.rest.repos.createDeploymentStatus({
0 commit comments