Skip to content

Commit 981ee2c

Browse files
committed
fix: double comment on broken PR
1 parent fd2c240 commit 981ee2c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ jobs:
8181
${{ env.COMMENT_IDENTIFIER }}
8282
edit-mode: replace
8383

84+
- name: Find Existing Comment
85+
if: ${{ github.event_name == 'pull_request_target' && steps.check-label.outputs.result == 'true' }}
86+
id: find-comment2
87+
uses: peter-evans/find-comment@v3
88+
with:
89+
issue-number: ${{ github.event.pull_request.number }}
90+
comment-author: 'github-actions[bot]'
91+
body-includes: ${{ env.COMMENT_IDENTIFIER }}
92+
8493
- name: Install Clang
8594
if: ${{ github.event_name == 'push' || steps.check-label.outputs.result == 'true' }}
8695
run: |
@@ -140,14 +149,6 @@ jobs:
140149
target-folder: ${{ env.PR_PATH }}
141150
clean: false
142151

143-
- name: Find Existing Comment
144-
if: ${{ github.event_name == 'pull_request_target' && steps.check-label.outputs.result == 'true' }}
145-
id: find-comment2
146-
uses: peter-evans/find-comment@v3
147-
with:
148-
issue-number: ${{ github.event.pull_request.number }}
149-
comment-author: 'github-actions[bot]'
150-
body-includes: ${{ env.COMMENT_IDENTIFIER }}
151152

152153
- name: Update Comment with Preview Link
153154
if: ${{ github.event_name == 'pull_request_target' && steps.check-label.outputs.result == 'true' }}
@@ -169,7 +170,7 @@ jobs:
169170
if: ${{ github.event_name == 'pull_request_target' && steps.check-label.outputs.result == 'true' && failure() }}
170171
uses: peter-evans/create-or-update-comment@v4
171172
with:
172-
comment-id: ${{ steps.find-comment.outputs.comment-id }}
173+
comment-id: ${{ steps.find-comment2.outputs.comment-id }}
173174
issue-number: ${{ github.event.pull_request.number }}
174175
body: |
175176
${{ env.FAILURE_ICON }} **Deployment of this PR failed.** Please check the [Actions logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details.

0 commit comments

Comments
 (0)