name: SonarCloud analysis on: workflow_dispatch: schedule: # * is a special character in YAML so you have to quote this string # expression evaluates to midnight on Tuesdays UTC - cron: '0 0 * * 2' permissions: pull-requests: read # allows SonarCloud to decorate PRs with analysis results jobs: Analysis: runs-on: ubuntu-latest if: github.repository == 'hyperledger/besu' steps: - name: checkout uses: actions/checkout@v4 - name: Set up JDK 17 uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' cache: gradle - name: Cache SonarCloud packages uses: actions/cache@v3 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Build and analyze env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: ./gradlew build sonarqube --continue --info