Skip to content

Commit

Permalink
test comment
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Sep 27, 2023
1 parent b55fa72 commit fa67faa
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,39 @@ env:
COMMENT_FAILURE_MSG: ':x: Cypress test run failed.'

jobs:
test-add-comment:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ inputs.pr_number }}
comment-author: 'github-actions[bot]'
body-includes: "${{ env.COMMENT_TAG }}"

- name: Add comment on the PR
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ inputs.pr_number }}
body: |
### ${{ env.COMMENT_TAG }}
#### ${{ env.CYPRESS_VISBUILDER_ENABLED && env.COMMENT_SUCCESS_MSG || env.COMMENT_FAILURE_MSG }}
#### Inputs:
Test repo: `${{ env.REPO }}`
Test branch: `${{ env.TEST_BRANCH }}`
Spec: `${{ env.SPEC }}${{ env.ADDITIONAL_SPEC }}`
Link to results:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
edit-mode: replace

cypress-tests:
runs-on: ubuntu-latest
container:
Expand Down

0 comments on commit fa67faa

Please sign in to comment.