chore(deps): bump com.gradle:gradle-enterprise-gradle-plugin from 3.19 to 3.19.1 in /android #3492
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Static analysis with SonarCloud | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main, support/2.x.x] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
jobs: | |
checksecret: | |
name: check if SONAR_TOKEN is set in github secrets | |
runs-on: ubuntu-latest | |
outputs: | |
is_SONAR_TOKEN_set: ${{ steps.checksecret_job.outputs.is_SONAR_TOKEN_set }} | |
steps: | |
- name: Check whether unity activation requests should be done | |
id: checksecret_job | |
run: | | |
echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT | |
build: | |
needs: [checksecret] | |
if: needs.checksecret.outputs.is_SONAR_TOKEN_set == 'true' | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'temurin' | |
cache: gradle | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Gradle packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Build and analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
run: ./gradlew build sonarqube --info |