Skip to content

Commit

Permalink
Find and replace existing comment when creating a PR build
Browse files Browse the repository at this point in the history
  • Loading branch information
adamyeats committed Sep 21, 2023
1 parent 092dcd9 commit 91d9b3a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pull-request-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,25 @@ jobs:
runs-on: ubuntu-latest
needs: push_to_registry
steps:
- name: Find previous comment (if any)
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: 1
body-includes: Use the following command to run this PR with Docker
- name: Update comment on PR
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.number }}
body: |
Use the following command to run this PR with Docker at http://localhost:3000:
```
docker run --rm -p 3000:3000 grafana/plugin-builds:${{ github.event.pull_request.head.sha }}pre
```
- name: Add comment to PR
if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.number }}
Expand Down

0 comments on commit 91d9b3a

Please sign in to comment.