with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v4
with:
java-version: 17
+ distribution: 'zulu' # Alternative distribution options are available.
- name: Cache SonarQube packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~\\.sonar\\cache
key: \${{ runner.os }}-sonar
restore-keys: \${{ runner.os }}-sonar
- name: Cache SonarQube scanner
id: cache-sonar-scanner
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: .\\.sonar\\scanner
key: \${{ runner.os }}-sonar-scanner
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- - uses: sonarsource/sonarqube-scan-action@master
+ - uses: sonarsource/sonarqube-scan-action@v2
env:
SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- - uses: sonarsource/sonarqube-scan-action@master
+ - uses: sonarsource/sonarqube-scan-action@v2
env:
SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v4
with:
java-version: 17
+ distribution: 'zulu' # Alternative distribution options are available.
- name: Cache SonarQube packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: \${{ runner.os }}-sonar
restore-keys: \${{ runner.os }}-sonar
- name: Cache Gradle packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: \${{ runner.os }}-gradle-\${{ hashFiles('**/*.gradle') }}
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v4
with:
java-version: 17
+ distribution: 'zulu' # Alternative distribution options are available.
- name: Cache SonarQube packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: \${{ runner.os }}-sonar
restore-keys: \${{ runner.os }}-sonar
- name: Cache Maven packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~/.m2
key: \${{ runner.os }}-m2-\${{ hashFiles('**/pom.xml') }}
function dotnetYamlSteps(projectKey: string) {
return `
- name: Set up JDK 17
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v4
with:
java-version: 17
+ distribution: 'zulu' # Alternative distribution options are available.
- name: Cache SonarQube packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~\\.sonar\\cache
key: \${{ runner.os }}-sonar
restore-keys: \${{ runner.os }}-sonar
- name: Cache SonarQube scanner
id: cache-sonar-scanner
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: .\\.sonar\\scanner
key: \${{ runner.os }}-sonar-scanner
const GRADLE_YAML_STEPS = `
- name: Set up JDK 17
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v4
with:
java-version: 17
+ distribution: 'zulu' # Alternative distribution options are available.
- name: Cache SonarQube packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: \${{ runner.os }}-sonar
restore-keys: \${{ runner.os }}-sonar
- name: Cache Gradle packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: \${{ runner.os }}-gradle-\${{ hashFiles('**/*.gradle') }}
function mavenYamlSteps(projectKey: string, projectName: string) {
return `
- name: Set up JDK 17
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v4
with:
java-version: 17
+ distribution: 'zulu' # Alternative distribution options are available.
- name: Cache SonarQube packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: \${{ runner.os }}-sonar
restore-keys: \${{ runner.os }}-sonar
- name: Cache Maven packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~/.m2
key: \${{ runner.os }}-m2-\${{ hashFiles('**/pom.xml') }}