Skip to content

Commit

Permalink
Fix: Double comment on Broken Build PR
Browse files Browse the repository at this point in the history
Signed-off-by: Adarsh <[email protected]>
  • Loading branch information
AdarshRawat1 committed Aug 2, 2024
1 parent f7ff11f commit 83e622c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ jobs:
${{ env.COMMENT_IDENTIFIER }}
edit-mode: replace

- name: Track intial Comment
if: ${{ github.event_name == 'pull_request_target' && steps.check-label.outputs.result == 'true' }}
id: find-comment2
uses: peter-evans/find-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: ${{ env.COMMENT_IDENTIFIER }}

- name: Install Clang
if: ${{ github.event_name == 'push' || steps.check-label.outputs.result == 'true' }}
run: |
Expand Down Expand Up @@ -139,15 +148,6 @@ jobs:
target-folder: ${{ env.PR_PATH }}
clean: false

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

- name: Update Comment with Preview Link
if: ${{ github.event_name == 'pull_request_target' && steps.check-label.outputs.result == 'true' }}
uses: peter-evans/create-or-update-comment@v4
Expand All @@ -168,7 +168,7 @@ jobs:
if: ${{ github.event_name == 'pull_request_target' && steps.check-label.outputs.result == 'true' && failure() }}
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
comment-id: ${{ steps.find-comment2.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
${{ 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.
Expand Down

0 comments on commit 83e622c

Please sign in to comment.