Add cache action #3
|
@ -60,10 +60,21 @@ jobs:
|
||||||
secrets: |
|
secrets: |
|
||||||
${{ inputs.vault_secrets_base_path }} sonarqube_token | SONAR_TOKEN ;
|
${{ 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: /root/.sonar/cache
|
||||||
|
|||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/build.gradle','**/settings.gradle') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
- name: run gradle sonar scan
|
- name: run gradle sonar scan
|
||||||
if: ${{ inputs.sonar_enabled }}
|
if: ${{ inputs.sonar_enabled }}
|
||||||
env:
|
|
||||||
SONAR_USER_HOME: "/opt/hostedtoolcache/.sonar"
|
|
||||||
run: ./gradlew sonar -i -s
|
run: ./gradlew sonar -i -s
|
||||||
|
|
||||||
- name: dockerfile lint check
|
- name: dockerfile lint check
|
||||||
|
|
Loading…
Reference in New Issue
this should be the like that
User cache: /root/.sonar/cache