@@ -163,6 +163,27 @@ jobs:
163163 FULL_COMMIT="${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || steps.getRef.outputs.PR_SHA || github.sha }}"
164164 echo "COMMIT_HASH=${FULL_COMMIT:0:7}" >> $GITHUB_ENV
165165
166+ - name : Update Status - Building
167+ if : steps.determine_action.outputs.action == 'deploy'
168+ uses : actions/github-script@v7
169+ with :
170+ script : |
171+ const result = ${{ steps.init-deployment.outputs.result }};
172+ const commentId = result.commentId;
173+
174+ const buildingMessage = [
175+ '🏗️ Building Docker image for PR #' + process.env.PR_NUMBER + ', commit ' + '${{ env.COMMIT_HASH }}',
176+ '',
177+ '[View Build Logs](' + result.workflowUrl + ')'
178+ ].join('\n');
179+
180+ await github.rest.issues.updateComment({
181+ owner: context.repo.owner,
182+ repo: context.repo.repo,
183+ comment_id: commentId,
184+ body: buildingMessage
185+ });
186+
166187 - name : Build Docker Image
167188 if : steps.determine_action.outputs.action == 'deploy'
168189 uses : ./.github/actions/build-docker-image
@@ -172,6 +193,29 @@ jobs:
172193 commit : ${{ env.COMMIT_HASH }}
173194 PR_NUMBER : ${{ env.PR_NUMBER }}
174195
196+ - name : Update Status - Deploying
197+ if : steps.determine_action.outputs.action == 'deploy'
198+ uses : actions/github-script@v7
199+ with :
200+ script : |
201+ const result = ${{ steps.init-deployment.outputs.result }};
202+ const commentId = result.commentId;
203+
204+ const deployingMessage = [
205+ '🚀 Deploying to Control Plane for PR #' + process.env.PR_NUMBER + ', commit ' + '${{ env.COMMIT_HASH }}',
206+ '',
207+ '⏳ Waiting for deployment to be ready...',
208+ '',
209+ '[View Deploy Logs](' + result.workflowUrl + ')'
210+ ].join('\n');
211+
212+ await github.rest.issues.updateComment({
213+ owner: context.repo.owner,
214+ repo: context.repo.repo,
215+ comment_id: commentId,
216+ body: deployingMessage
217+ });
218+
175219 - name : Deploy to Control Plane
176220 if : steps.determine_action.outputs.action == 'deploy'
177221 id : deploy
@@ -181,7 +225,7 @@ jobs:
181225 org : ${{ env.CPLN_ORG }}
182226 github_token : ${{ secrets.GITHUB_TOKEN }}
183227
184- - name : Update Status
228+ - name : Update Status - Deployment Complete
185229 if : steps.determine_action.outputs.action == 'deploy'
186230 uses : actions/github-script@v7
187231 with :
0 commit comments