Skip to content

Update build.yml

Update build.yml #31

Workflow file for this run

name: SonarQube Scan
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
sonarQubeScan:
name: SonarQube Scan
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin' # Changed to temurin
java-package: 'jdk'
check-latest: false
server-id: github
server-username: ${{ github.actor }}
server-password: ${{ secrets.GITHUB_TOKEN }}
overwrite-settings: true
job-status: success
- name: Run SonarQube Scanner
uses: sonarsource/sonarqube-scan-action@v3
with:
args: "-X" # Enable debug mode for detailed logs
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Make sure to set the SONAR_TOKEN in GitHub Secrets
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # Make sure to set the SonarQube host URL in GitHub Secrets