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

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git


The following commit(s) were added to refs/heads/master by this push:
     new f6364118e .github/workflows/sonar.yml: Restore caches for packages and 
scanner
f6364118e is described below

commit f6364118e39520c51986255cca91f46474d9bbf0
Author: Shad Storhaug <[email protected]>
AuthorDate: Thu Oct 19 16:25:48 2023 +0700

    .github/workflows/sonar.yml: Restore caches for packages and scanner
---
 .github/workflows/sonar.yml | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml
index 77489757d..094730cd7 100644
--- a/.github/workflows/sonar.yml
+++ b/.github/workflows/sonar.yml
@@ -46,27 +46,26 @@ jobs:
       - uses: actions/checkout@v3
         with:
           fetch-depth: 0  # Shallow clones should be disabled for a better 
relevancy of analysis
-      #- name: Cache SonarCloud packages
-      #  uses: actions/cache@v3
-      #  with:
-      #    path: ~\sonar\cache
-      #    key: ${{ runner.os }}-sonar
-      #    restore-keys: ${{ runner.os }}-sonar
-      #- name: Cache SonarCloud scanner
-      #  id: cache-sonar-scanner
-      #  uses: actions/cache@v3
-      #  with:
-      #    path: .\.sonar\scanner
-      #    key: ${{ runner.os }}-sonar-scanner
-      #    restore-keys: ${{ runner.os }}-sonar-scanner
+      - name: Cache SonarCloud packages
+        uses: actions/cache@v3
+        with:
+          path: ~\sonar\cache
+          key: ${{ runner.os }}-sonar
+          restore-keys: ${{ runner.os }}-sonar
+      - name: Cache SonarCloud scanner
+        id: cache-sonar-scanner
+        uses: actions/cache@v3
+        with:
+          path: .\.sonar\scanner
+          key: ${{ runner.os }}-sonar-scanner
+          restore-keys: ${{ runner.os }}-sonar-scanner
       - name: Install SonarCloud scanner
-        #if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
+        if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
         shell: powershell
         run: |
           $dir = '.\.sonar\scanner'
           if (!(Test-Path $dir)) { New-Item -Path $dir -ItemType Directory }
-          # NOTE: Using 5.8.0 when the sonar scan was first added because that 
is likely the version that was in the cache
-          dotnet tool update dotnet-sonarscanner --tool-path $dir #--version 
5.8.0
+          dotnet tool update dotnet-sonarscanner --tool-path $dir
       - name: Build and analyze
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR 
information, if any

Reply via email to