Skip to content

Commit ba8e3ac

Browse files
committed
update comments
1 parent b5ece69 commit ba8e3ac

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/pr-deploy.yaml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
PR_TITLE: ${{ steps.pr_number.outputs.PR_TITLE }}
3030
PR_URL: ${{ steps.pr_number.outputs.PR_URL }}
3131
PR_BRANCH: ${{ steps.pr_number.outputs.PR_BRANCH }}
32-
COMMENT_ID: ${{ steps.comment_id.outputs.comment-id }}
3332
CODER_BASE_IMAGE_TAG: ${{ steps.set_tags.outputs.CODER_BASE_IMAGE_TAG }}
3433
CODER_IMAGE_TAG: ${{ steps.set_tags.outputs.CODER_IMAGE_TAG }}
3534

@@ -63,24 +62,15 @@ jobs:
6362
CODER_BASE_IMAGE_TAG: ghcr.io/coder/coder-preview-base:pr${{ steps.pr_number.outputs.PR_NUMBER }}
6463
CODER_IMAGE_TAG: ghcr.io/coder/coder-preview:pr${{ steps.pr_number.outputs.PR_NUMBER }}
6564

66-
- name: Find Comment
67-
uses: peter-evans/find-comment@v2
68-
id: fc
69-
with:
70-
issue-number: ${{ steps.pr_number.outputs.PR_NUMBER }}
71-
comment-author: "github-actions[bot]"
72-
body-includes: This deployment will be deleted when the PR is closed
73-
7465
- name: Comment on PR
7566
id: comment_id
7667
uses: peter-evans/create-or-update-comment@v3
7768
with:
78-
comment-id: ${{ steps.fc.outputs.comment-id }}
7969
issue-number: ${{ steps.pr_number.outputs.PR_NUMBER }}
80-
edit-mode: replace
8170
body: |
8271
:rocket: Deploying PR ${{ steps.pr_number.outputs.PR_NUMBER }} ...
8372
:warning: This deployment will be deleted when the PR is closed.
73+
reactions: "-1"
8474

8575
build:
8676
needs: pr_commented
@@ -231,16 +221,28 @@ jobs:
231221
env:
232222
PR_DEPLOYMENT_ACCESS_URL: "https://pr${{ env.PR_NUMBER }}.${{ secrets.PR_DEPLOYMENTS_DOMAIN }}"
233223

224+
- name: Find Comment
225+
uses: peter-evans/find-comment@v2
226+
id: fc
227+
with:
228+
issue-number: ${{ env.PR_NUMBER }}
229+
comment-author: "github-actions[bot]"
230+
body-includes: This deployment will be deleted when the PR is closed
231+
234232
- name: Comment on PR
235233
uses: peter-evans/create-or-update-comment@v3
236234
with:
237235
issue-number: ${{ env.PR_NUMBER }}
238236
edit-mode: replace
239-
comment-id: ${{ needs.pr_commented.outputs.COMMENT_ID }}
237+
comment-id: ${{ steps.fc.outputs.comment-id }}
240238
body: |
241239
:heavy_check_mark: Deployed PR ${{ env.PR_NUMBER }} successfully.
242240
:rocket: Access the deployment link [here](${{ env.PR_DEPLOYMENT_ACCESS_URL }}).
243241
:warning: This deployment will be deleted when the PR is closed.
244-
reactions: "+1"
242+
reactions: |
243+
+1
244+
rocket
245+
reactions-edit-mode: replace
246+
245247
env:
246248
PR_DEPLOYMENT_ACCESS_URL: "https://pr${{ env.PR_NUMBER }}.${{ secrets.PR_DEPLOYMENTS_DOMAIN }}"

0 commit comments

Comments
 (0)