Skip to content

Commit 36538ee

Browse files
authored
Optimize Preview PR CI without duplicate comments (#904)
1 parent 6a87cb9 commit 36538ee

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/pr-preview.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,16 @@ jobs:
2020
SCRIPT_BEFORE: bash /home/thephpfoundation/scripts/pr_created_pre.sh web-php ${{ github.event.number }}
2121
SCRIPT_AFTER: bash /home/thephpfoundation/scripts/pr_created.sh web-php ${{ github.event.number }}
2222

23+
- uses: peter-evans/find-comment@v2
24+
id: fc
25+
with:
26+
issue-number: ${{ github.event.number }}
27+
comment-author: 'github-actions[bot]'
28+
2329
- uses: peter-evans/create-or-update-comment@v3
2430
with:
2531
issue-number: ${{ github.event.number }}
32+
comment-id: ${{ steps.fc.outputs.comment-id }}
2633
edit-mode: 'replace'
2734
body: |
28-
🚀 Deployed on https://web-php-pr-${{ github.event.number }}.preview.thephp.foundation
35+
🚀 Commit ${{ github.sha }} Deployed on https://web-php-pr-${{ github.event.number }}.preview.thephp.foundation

0 commit comments

Comments
 (0)