Skip to content

Commit 85fea3f

Browse files
committed
refactor: use johanwulf/replace-comment action
1 parent c24e543 commit 85fea3f

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

.github/workflows/opentofu.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,11 @@ jobs:
7272
echo '```'
7373
} > comment-body.md
7474
75-
- name: find-comment
76-
uses: peter-evans/find-comment@v3
77-
id: fc
78-
with:
79-
issue-number: ${{ github.event.pull_request.number }}
80-
comment-author: 'github-actions[bot]'
81-
body-includes: '<!-- opentofu-plan -->'
82-
83-
- name: delete-comment
84-
if: steps.fc.outputs.comment-id != ''
85-
run: gh api repos/${{ github.repository }}/issues/comments/${{ steps.fc.outputs.comment-id }} -X DELETE
86-
env:
87-
GH_TOKEN: ${{ github.token }}
88-
8975
- name: comment
90-
uses: peter-evans/create-or-update-comment@v4
76+
uses: johanwulf/replace-comment@v1
9177
with:
9278
issue-number: ${{ github.event.pull_request.number }}
79+
body-includes: '<!-- opentofu-plan -->'
9380
body-path: comment-body.md
9481

9582
apply:

0 commit comments

Comments
 (0)