Merge pull request 'Add cache action' (#3) from Add-cache-action into master
Reviewed-on: #3
This commit is contained in:
commit
f34138c47c
|
@ -60,10 +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: /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
|
||||
if: ${{ inputs.sonar_enabled }}
|
||||
env:
|
||||
SONAR_USER_HOME: "/opt/hostedtoolcache/.sonar"
|
||||
run: ./gradlew sonar -i -s
|
||||
|
||||
- name: dockerfile lint check
|
||||
|
|
Loading…
Reference in New Issue