Change location for cache action.
This commit is contained in:
parent
f34138c47c
commit
569cc05d5c
|
@ -47,7 +47,7 @@ jobs:
|
|||
cache-read-only: ${{ gitea.ref != 'refs/heads/master' && gitea.ref != 'refs/heads/develop' }}
|
||||
|
||||
- name: run gradle check
|
||||
run: ./gradlew ${{ inputs.gradle_check_command }} -i -s
|
||||
run: ./gradlew ${{ inputs.gradle_check_command }}
|
||||
|
||||
- id: import-secrets
|
||||
if: ${{ inputs.sonar_enabled }}
|
||||
|
@ -60,22 +60,22 @@ 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
|
||||
- name: calc sonar cache key
|
||||
if: ${{ inputs.sonar_enabled }}
|
||||
run: echo "SONAR_SETTINGS_HASH=$(sha1sum ${{ github.workspace }}/build.gradle)" >> "$GITHUB_ENV"
|
||||
- id: cache-sonar
|
||||
if: ${{ inputs.sonar_enabled }}
|
||||
uses: https://github.com/actions/cache@v3
|
||||
with:
|
||||
path: /root/.sonar/cache
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/build.gradle','**/settings.gradle') }}
|
||||
path: ~/.sonar/cache
|
||||
key: cache-sonar-modules-${{ env.SONAR_SETTINGS_HASH }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
cache-sonar-modules-${{ env.SONAR_SETTINGS_HASH }}
|
||||
cache-sonar-modules-
|
||||
|
||||
- name: run gradle sonar scan
|
||||
if: ${{ inputs.sonar_enabled }}
|
||||
run: ./gradlew sonar -i -s
|
||||
run: ./gradlew sonar
|
||||
|
||||
- name: dockerfile lint check
|
||||
uses: https://github.com/hadolint/hadolint-action@v3.1.0
|
||||
|
|
Loading…
Reference in New Issue