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

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


The following commit(s) were added to refs/heads/4.17 by this push:
     new 85df82c2a9 Revert ".github: try using just sonarcloud job on 
pull_request target only"
85df82c2a9 is described below

commit 85df82c2a98cd41bbc18cb73d7a4d5c844602b5f
Author: Rohit Yadav <[email protected]>
AuthorDate: Fri Jul 1 11:25:27 2022 +0530

    Revert ".github: try using just sonarcloud job on pull_request target only"
    
    This reverts commit aad73322aff1a5b1393c024949c6ba0b021a4c90.
---
 .github/workflows/coverage-check.yml | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/coverage-check.yml 
b/.github/workflows/coverage-check.yml
index 5120c7de2a..0a51702f11 100644
--- a/.github/workflows/coverage-check.yml
+++ b/.github/workflows/coverage-check.yml
@@ -17,7 +17,7 @@
 
 name: PR Quality Check
 
-on: [pull_request]
+on: [pull_request_target]
 
 jobs:
   build:
@@ -29,8 +29,38 @@ jobs:
           ref: "refs/pull/${{ github.event.number }}/merge"
           fetch-depth: 0
 
+      - name: Changed UI Files
+        id: ui-changes
+        uses: tj-actions/changed-files@a59f800cbb60ed483623848e31be67659a2940f8
+        with:
+          sha: "${{ github.pull_request.sha }}"
+          base_sha: "${{ github.sha }}"
+          files: |
+            ui/*
+
+      - name: Kick UI Build
+        uses: 
peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
+        if: steps.ui-changes.outputs.any_changed == 'true'
+        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: Changed Java Files
+        id: java-changes
+        uses: tj-actions/changed-files@a59f800cbb60ed483623848e31be67659a2940f8
+        with:
+          sha: "${{ github.pull_request.sha }}"
+          base_sha: "${{ github.sha }}"
+          files: |
+            **/*.java
+            **/*.xml
+
       - name: Set up JDK11
         uses: actions/setup-java@v3
+        if: steps.java-changes.outputs.any_changed == 'true'
         with:
           distribution: 'temurin'
           java-version: '11'
@@ -53,6 +83,7 @@ jobs:
 
       - name: Run Build and Tests with Coverage
         id: coverage
+        if: steps.java-changes.outputs.any_changed == 'true'
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

Reply via email to