@@ -254,6 +254,12 @@ jobs:
254254 uses : actions/github-script@v7
255255 with :
256256 script : |
257+ const commentId = Number("${{ steps.create-comment.outputs.comment-id }}");
258+ if (!Number.isFinite(commentId) || commentId <= 0) {
259+ core.warning("Skipping PR comment update because no comment id was created.");
260+ return;
261+ }
262+
257263 const body = [
258264 `🏗️ Building Docker image for PR #${process.env.PR_NUMBER}, commit ${process.env.PR_SHA}`,
259265 "",
@@ -265,7 +271,7 @@ jobs:
265271 await github.rest.issues.updateComment({
266272 owner: context.repo.owner,
267273 repo: context.repo.repo,
268- comment_id: Number("${{ steps.create-comment.outputs.comment-id }}") ,
274+ comment_id: commentId ,
269275 body
270276 });
271277
@@ -279,12 +285,19 @@ jobs:
279285 pr_number : ${{ env.PR_NUMBER }}
280286 docker_build_extra_args : ${{ vars.DOCKER_BUILD_EXTRA_ARGS }}
281287 docker_build_ssh_key : ${{ secrets.DOCKER_BUILD_SSH_KEY }}
288+ docker_build_ssh_known_hosts : ${{ vars.DOCKER_BUILD_SSH_KNOWN_HOSTS }}
282289
283290 - name : Update PR comment with deploy status
284291 if : steps.config.outputs.ready == 'true' && steps.source.outputs.allowed == 'true' && (steps.check-app.outputs.exists == 'true' || steps.setup-review-app.outcome == 'success')
285292 uses : actions/github-script@v7
286293 with :
287294 script : |
295+ const commentId = Number("${{ steps.create-comment.outputs.comment-id }}");
296+ if (!Number.isFinite(commentId) || commentId <= 0) {
297+ core.warning("Skipping PR comment update because no comment id was created.");
298+ return;
299+ }
300+
288301 const body = [
289302 "🚀 Deploying review app to Control Plane...",
290303 "",
@@ -296,7 +309,7 @@ jobs:
296309 await github.rest.issues.updateComment({
297310 owner: context.repo.owner,
298311 repo: context.repo.repo,
299- comment_id: Number("${{ steps.create-comment.outputs.comment-id }}") ,
312+ comment_id: commentId ,
300313 body
301314 });
302315
@@ -356,6 +369,11 @@ jobs:
356369 `[View workflow logs](${process.env.WORKFLOW_URL})`
357370 ].join("\n");
358371
372+ if (!Number.isFinite(commentId) || commentId <= 0) {
373+ core.warning("Skipping PR comment update because no comment id was created.");
374+ return;
375+ }
376+
359377 await github.rest.issues.updateComment({
360378 owner: context.repo.owner,
361379 repo: context.repo.repo,
0 commit comments