Merge pull request 'Add cache action' (#3) from Add-cache-action into master

Reviewed-on: #3
This commit is contained in:
Stanislav Melnichuk 2023-06-09 10:14:23 +00:00
commit f34138c47c
1 changed files with 13 additions and 2 deletions

View File

@ -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