|
71 | 71 |
|
72 | 72 | - name: Validate Required Secrets and Variables |
73 | 73 | uses: ./.github/actions/validate-required-vars |
| 74 | + with: |
| 75 | + CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }} |
| 76 | + CPLN_TOKEN_PRODUCTION: ${{ secrets.CPLN_TOKEN_PRODUCTION }} |
| 77 | + CPLN_ORG_STAGING: ${{ vars.CPLN_ORG_STAGING }} |
| 78 | + CPLN_ORG_PRODUCTION: ${{ vars.CPLN_ORG_PRODUCTION }} |
| 79 | + REVIEW_APP_PREFIX: ${{ vars.REVIEW_APP_PREFIX }} |
| 80 | + PRODUCTION_APP_NAME: ${{ vars.PRODUCTION_APP_NAME }} |
| 81 | + STAGING_APP_NAME: ${{ vars.STAGING_APP_NAME }} |
74 | 82 |
|
75 | 83 | - name: Get PR HEAD Ref |
76 | 84 | id: getRef |
@@ -222,7 +230,13 @@ jobs: |
222 | 230 | owner: context.repo.owner, |
223 | 231 | repo: context.repo.repo, |
224 | 232 | issue_number: process.env.PR_NUMBER, |
225 | | - body: '🚀 Starting deployment process...\n\n' + process.env.CONSOLE_LINK |
| 233 | + body: [ |
| 234 | + `🏗️ Building Docker image for PR [#${process.env.PR_NUMBER}](${process.env.GITHUB_SERVER_URL}/${context.repo.owner}/${context.repo.repo}/pull/${process.env.PR_NUMBER}), commit [${context.sha.substring(0, 7)}](${process.env.GITHUB_SERVER_URL}/${context.repo.owner}/${context.repo.repo}/commit/${context.sha})`, |
| 235 | + '', |
| 236 | + `📝 [View Build Logs](${process.env.GITHUB_SERVER_URL}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/job/${context.job})`, |
| 237 | + '', |
| 238 | + process.env.CONSOLE_LINK |
| 239 | + ].join('\n') |
226 | 240 | }); |
227 | 241 | core.setOutput('comment-id', result.data.id); |
228 | 242 |
|
@@ -309,25 +323,6 @@ jobs: |
309 | 323 | token: ${{ secrets.CPLN_TOKEN_STAGING }} |
310 | 324 | org: ${{ vars.CPLN_ORG_STAGING }} |
311 | 325 |
|
312 | | - - name: Update Status - Building |
313 | | - uses: actions/github-script@v7 |
314 | | - with: |
315 | | - script: | |
316 | | - const buildingMessage = [ |
317 | | - '🏗️ Building Docker image for PR #${{ needs.process-deployment.outputs.pr_number }}, commit ${{ needs.process-deployment.outputs.pr_sha }}', |
318 | | - '', |
319 | | - '📝 [View Build Logs](${{ env.WORKFLOW_URL }})', |
320 | | - '', |
321 | | - process.env.CONSOLE_LINK |
322 | | - ].join('\n'); |
323 | | - |
324 | | - await github.rest.issues.updateComment({ |
325 | | - owner: context.repo.owner, |
326 | | - repo: context.repo.repo, |
327 | | - comment_id: ${{ needs.process-deployment.outputs.comment_id }}, |
328 | | - body: buildingMessage |
329 | | - }); |
330 | | -
|
331 | 326 | - name: Build Docker Image |
332 | 327 | id: build |
333 | 328 | uses: ./.github/actions/build-docker-image |
@@ -368,7 +363,7 @@ jobs: |
368 | 363 | await github.rest.issues.updateComment({ |
369 | 364 | owner: context.repo.owner, |
370 | 365 | repo: context.repo.repo, |
371 | | - comment_id: ${{ steps.create-comment.outputs.comment-id }}, |
| 366 | + comment_id: ${{ needs.build.outputs.comment_id }}, |
372 | 367 | body: deployingMessage |
373 | 368 | }); |
374 | 369 |
|
|
0 commit comments