Skip to content

Commit

Permalink
Optimize Preview PR CI without duplicate comments (#904)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored Dec 18, 2023
1 parent 6a87cb9 commit 36538ee
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ jobs:
SCRIPT_BEFORE: bash /home/thephpfoundation/scripts/pr_created_pre.sh web-php ${{ github.event.number }}
SCRIPT_AFTER: bash /home/thephpfoundation/scripts/pr_created.sh web-php ${{ github.event.number }}

- uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.number }}
comment-author: 'github-actions[bot]'

- uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: 'replace'
body: |
🚀 Deployed on https://web-php-pr-${{ github.event.number }}.preview.thephp.foundation
🚀 Commit ${{ github.sha }} Deployed on https://web-php-pr-${{ github.event.number }}.preview.thephp.foundation

0 comments on commit 36538ee

Please sign in to comment.