You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2022/04/18 11:35:12 UTC

[cloudstack] branch main updated: .github: detect and kick packaging jobs

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

rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 15928f8cc89 .github: detect and kick packaging jobs
15928f8cc89 is described below

commit 15928f8cc89983bc2eb7689a5ac401bd0cdb0a3a
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Mon Apr 18 17:04:44 2022 +0530

    .github: detect and kick packaging jobs
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
 .github/workflows/coverage-check.yml | 30 ++++++++++++++++++++++--------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/coverage-check.yml b/.github/workflows/coverage-check.yml
index af85ad8d60f..5ff1dfcf06b 100644
--- a/.github/workflows/coverage-check.yml
+++ b/.github/workflows/coverage-check.yml
@@ -52,11 +52,24 @@ jobs:
             ui/*
 
       - name: Kick UI Build
+        uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
         if: steps.ui-changes.outputs.any_changed == 'true'
-        run: |
-          curl -s -H "Authorization: token ${{ secrets.ACS_ROBOT_TOKEN }}" \
-            -X POST -d '{"body": "UI changes found, kicking a new QA UI build\n@blueorangutan ui"}' \
-            "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
+        with:
+          token: ${{ secrets.ACS_ROBOT_TOKEN }}
+          issue-number: ${{ github.event.pull_request.number }}
+          body: |
+            Found UI changes, kicking a new UI QA build
+            @blueorangutan ui
+
+      - name: Kick Pkg Build
+        uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
+        if: steps.java-changes.outputs.any_changed == 'true' && ! github.event.pull_request.draft
+        with:
+          token: ${{ secrets.ACS_ROBOT_TOKEN }}
+          issue-number: ${{ github.event.pull_request.number }}
+          body: |
+            Found Java/XML changes, kicking packaging job
+            @blueorangutan package
 
       - name: Set up JDK11
         uses: actions/setup-java@v3
@@ -84,8 +97,9 @@ jobs:
           echo "EOF" >> $GITHUB_ENV
 
       - name: Comment PR Coverage Report
+        uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
         if: steps.java-changes.outputs.any_changed == 'true'
-        run: |
-          curl -s -H "Authorization: token ${{ secrets.ACS_ROBOT_TOKEN }}" \
-            -X POST -d '{"body": "PR Coverage Report\n|**CLASS**|**INSTRUCTION MISSED**|**INSTRUCTION COVERED**|**BRANCH MISSED**|**BRANCH COVERED**|**LINE MISSED**|**LINE COVERED**|\n|-----|-----|-----|-----|-----|-----|-----|\n${{ env.COVERAGE }}"}' \
-            "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
+        with:
+          token: ${{ secrets.ACS_ROBOT_TOKEN }}
+          issue-number: ${{ github.event.pull_request.number }}
+          body: "## PR Coverage Report\n|**CLASS**|**INSTRUCTION MISSED**|**INSTRUCTION COVERED**|**BRANCH MISSED**|**BRANCH COVERED**|**LINE MISSED**|**LINE COVERED**|\n|-----|-----|-----|-----|-----|-----|-----|\n${{ env.COVERAGE }}"