Skip to content

Commit 745a6f2

Browse files
committed
fix
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent 5225a4b commit 745a6f2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/build-pr-cmk.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,26 @@ jobs:
5050
path: cmk.linux.x86-64.pr${{ steps.set_vars.outputs.pr_number }}
5151
if-no-files-found: error
5252

53+
- name: Find existing PR comment
54+
id: find_comment
55+
if: steps.set_vars.outputs.pr_number != ''
56+
uses: peter-evans/find-comment@v3
57+
with:
58+
issue-number: ${{ steps.set_vars.outputs.pr_number }}
59+
comment-author: 'github-actions[bot]'
60+
body-includes: '<!-- cmk-build-artifact-comment -->'
61+
5362
- name: Create/update comment
5463
uses: peter-evans/create-or-update-comment@v4
5564
if: steps.set_vars.outputs.pr_number != ''
5665
with:
5766
token: ${{ secrets.GITHUB_TOKEN }}
5867
issue-number: ${{ steps.set_vars.outputs.pr_number }}
68+
comment-id: ${{ steps.find_comment.outputs.comment-id }}
5969
body: |
6070
<!-- cmk-build-artifact-comment -->
6171
${{ job.status == 'success' && '✅ Build complete' || '❌ Build failed' }} for PR #${{ steps.set_vars.outputs.pr_number }}.
6272
${{ job.status == 'success'
6373
&& format('🔗 [Download the cmk binary](https://github.com/{0}/actions/runs/{1})', github.repository, github.run_id)
6474
|| format('See the [workflow run](https://github.com/{0}/actions/runs/{1}) for details.', github.repository, github.run_id) }}
6575
edit-mode: replace
66-
body-includes: cmk-build-artifact-comment
67-

0 commit comments

Comments
 (0)