Skip to content

Commit d0240e2

Browse files
authored
Merge pull request #169 from OpenVoxProject/nmburgan-patch-1
Update build comment if it already exists
2 parents 1f4a73a + 91cc399 commit d0240e2

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,23 @@ jobs:
163163
path: output/
164164
retention-days: 1 # quite low retention, because the artifacts are quite large
165165
overwrite: true # overwrite old artifacts if a PR runs again (artifacts are per PR * per project)
166-
- name: Add comment
166+
- name: Find existing comment
167+
uses: peter-evans/find-comment@v3
168+
if: github.event.pull_request.head.repo.full_name == github.repository
169+
id: find-comment
170+
with:
171+
issue-number: ${{ github.event.pull_request.number }}
172+
comment-author: 'github-actions[bot]'
173+
body-includes: '<!-- build-artifacts -->'
174+
- name: Add or update comment
167175
uses: peter-evans/create-or-update-comment@v5
168-
# Check if the event is not triggered by a fork
169-
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#restrictions-on-repository-forks
170176
if: github.event.pull_request.head.repo.full_name == github.repository
171177
with:
178+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
172179
issue-number: ${{ github.event.pull_request.number }}
180+
edit-mode: replace
173181
body: |-
182+
<!-- build-artifacts -->
174183
The rpm/deb packages and the JAR file for openvoxdb are available in a zip archive:
175184
${{ steps.upload.outputs.artifact-url }}
176185

0 commit comments

Comments
 (0)