Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create initial deploy preview comment after build completes #907

Merged
merged 12 commits into from
Nov 28, 2024
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
deploy-pr-preview:
uses: grafana/writers-toolkit/.github/workflows/deploy-preview.yml@main
uses: grafana/writers-toolkit/.github/workflows/deploy-preview.yml@robbymilo/deploy-preview
with:
sha: ${{ github.event.pull_request.head.sha }}
branch: ${{ github.head_ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
body-includes: Deploy preview available

- name: Update comment with in-progress deploy preview
if: steps.fc.outputs.comment-id != '' && github.event.action == 'opened' || github.event.action == 'synchronize'
if: steps.fc.outputs.comment-id != '' && (github.event.action == 'opened' || github.event.action == 'synchronize')
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
description: "Public deploy preview"

- name: Create comment with available deploy preview
if: github.event.action == 'opened' || github.event.action == 'synchronize' && steps.fc.outputs.comment-id == ''
if: (github.event.action == 'opened' || github.event.action == 'synchronize') && steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
issue-number: ${{ inputs.event_number }}
Expand All @@ -185,7 +185,7 @@ jobs:
:computer: Deploy preview deleted.

- name: Update comment with available deploy preview
if: github.event.action == 'opened' || github.event.action == 'synchronize' && steps.fc.outputs.comment-id != ''
if: (github.event.action == 'opened' || github.event.action == 'synchronize') && steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
Expand Down