Skip to content

Merge pull request #247 from mybatis/renovate/github-codeql-action-di… #158

Merge pull request #247 from mybatis/renovate/github-codeql-action-di…

Merge pull request #247 from mybatis/renovate/github-codeql-action-di… #158

Workflow file for this run

name: SonarCloud
on:
push:
branches:
- master
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
SONAR_ORGANIZATION: mybatis
SONAR_PROJECT_KEY: freemarker-scripting
jobs:
build:
if: github.repository_owner == 'mybatis'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
with:
cache: maven
distribution: temurin
java-version: 25
- name: Set SONAR_SCANNER_JAVA_OPTS
run: echo "SONAR_SCANNER_JAVA_OPTS=-Xmx512m" >> ${GITHUB_ENV}
- name: Analyze with SonarCloud
run: ./mvnw verify jacoco:report sonar:sonar --batch-mode --no-transfer-progress --show-version -Dlicense.skip=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=${{ env.SONAR_ORGANIZATION }} -Dsonar.projectKey=${{ env.SONAR_ORGANIZATION }}_${{ env.SONAR_PROJECT_KEY }} -Dsonar.scanner.skipJreProvisioning=true -Dsonar.token=${{ env.SONAR_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}