Add cache action #3

Merged
stanislav.melnichuk merged 4 commits from Add-cache-action into master 2023-06-09 10:14:24 +00:00
1 changed files with 13 additions and 1 deletions
Showing only changes of commit a00ba44968 - Show all commits

View File

@ -60,9 +60,21 @@ jobs:
secrets: |
${{ inputs.vault_secrets_base_path }} sonarqube_token | SONAR_TOKEN ;
- name: Cache sonar modules
id: cache-sonar
uses: actions/cache@v3
env:
cache-name: cache-sonar-modules
with:
path: /opt/hostedtoolcache/.sonar/

this should be the like that
User cache: /root/.sonar/cache

this should be the like that User cache: /root/.sonar/cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: run gradle sonar scan
if: ${{ inputs.sonar_enabled }}
uses: actions/cache@v3
env:
SONAR_USER_HOME: "/opt/hostedtoolcache/.sonar"
run: ./gradlew sonar -i -s