You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/05/30 18:19:22 UTC

[camel] 01/01: Add comment result to the component-test action

This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch component-tests-v3
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 486a624fc6902003acdf9ac0f713b7ae5d43ea91
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Tue May 30 20:18:51 2023 +0200

    Add comment result to the component-test action
---
 .github/workflows/pr-comment-main.yml | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/pr-comment-main.yml b/.github/workflows/pr-comment-main.yml
index ff5647f622d..ba2b31d2bf7 100644
--- a/.github/workflows/pr-comment-main.yml
+++ b/.github/workflows/pr-comment-main.yml
@@ -36,7 +36,8 @@ jobs:
           echo Component tests have been requested
       - uses: actions/checkout@v3
         with:
-          ref: ${{ github.ref }}
+          ref: ${{ github.event.issue.pull_request.head.ref}}
+          repository: ${{ github.event.issue.pull_request.head.repo.full_name }}
       - id: install-packages
         uses: ./.github/actions/install-packages
       - name: Set up JDK ${{ matrix.java }}
@@ -50,3 +51,21 @@ jobs:
         uses: ./.github/actions/component-test
         with:
           comment-body: ${{ github.event.comment.body }}
+      - name: Success comment
+        if: success()
+        uses: peter-evans/create-or-update-comment@v3.0.1
+        with:
+          comment-id: ${{ github.event.comment.id }}
+          body: |
+            ${{ github.event.comment.body }}
+            The tests passed successfully
+          reactions: hooray
+      - name: Failure comment
+        if: failure()
+        uses: peter-evans/create-or-update-comment@v3.0.1
+        with:
+          comment-id: ${{ github.event.comment.id }}
+          body: |
+            ${{ github.event.comment.body }}
+            The tests failed
+          reactions: confused