Skip to content

chore(deps): update sonar-orchestrator.version to v5.1.0.2254 (#1109) #1175

chore(deps): update sonar-orchestrator.version to v5.1.0.2254 (#1109)

chore(deps): update sonar-orchestrator.version to v5.1.0.2254 (#1109) #1175

Workflow file for this run

on:
push:
branches:
- master
- sq-10
paths-ignore:
- '.github/actions/**'
pull_request_target:
branches:
- master
paths-ignore:
- '.github/actions/**'
release:
types:
- created
# set necessary permissions for SQ's GitHub integration
# https://docs.sonarqube.org/latest/analysis/github-integration/#header-2
permissions:
checks: write
contents: read
pull-requests: write
statuses: read
jobs:
build:
# Forked repos do not have access to the Sonar account
if: github.repository == 'spotbugs/sonar-findbugs'
runs-on: ubuntu-latest
env:
# previous LTS version
SONAR_SERVER_VERSION: 9.9.7.96285
SONAR_PLUGIN_API_VERSION: 9.14.0.375
steps:
- name: Decide the ref to check out
uses: haya14busa/action-cond@v1
id: condval
with:
cond: ${{ github.event_name == 'pull_request_target' }}
if_true: refs/pull/${{ github.event.pull_request.number }}/merge
if_false: ${{ github.ref }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ steps.condval.outputs.value }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: 'maven'
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: |
~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build
run: |
./mvnw org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -B -e -V -DskipITs \
-Dsonar.server.version=${{ env.SONAR_SERVER_VERSION }} \
-Dsonar-plugin-api.version=${{ env.SONAR_PLUGIN_API_VERSION }} \
-Dsonar.projectKey=com.github.spotbugs:sonar-findbugs-plugin \
-Dsonar.organization=spotbugs \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.token=$SONAR_TOKEN \
${PR_NUMBER:+ -Dsonar.pullrequest.key=$PR_NUMBER -Dsonar.pullrequest.branch=$PR_BRANCH }
env:
GITHUB_TOKEN: ${{ secrets.PAT_TO_FORK }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_BRANCH: ${{ github.event.pull_request.head.ref }}
CI: true