Skip to content

ci: add SonarQube analysis workflow#1

Merged
TimKenobi merged 1 commit into
mainfrom
add-sonarqube-workflow
May 6, 2026
Merged

ci: add SonarQube analysis workflow#1
TimKenobi merged 1 commit into
mainfrom
add-sonarqube-workflow

Conversation

@TimKenobi
Copy link
Copy Markdown
Owner

Adds .github/workflows/sonarqube-analysis.yml so this repo gets analyzed by self-hosted SonarQube on every push and PR.

Project key will be TimKenobi_DomainSentry (matches existing naming convention).

Repo secrets SONAR_TOKEN and SONAR_HOST_URL have been set.

Copilot AI review requested due to automatic review settings May 6, 2026 23:03
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a GitHub Actions workflow to run SonarQube analysis on pushes and pull requests against the default branches to keep code quality signals up to date in the self-hosted SonarQube instance.

Changes:

  • Added a new GitHub Actions workflow to run SonarQube scans on push and pull_request events.
  • Configured checkout with full history (fetch-depth: 0) to improve SonarQube analysis accuracy.
  • Passed SonarQube auth/host configuration via repository secrets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +30
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@v2
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectKey=TimKenobi_${{ github.event.repository.name }}
-Dsonar.projectName=${{ github.event.repository.name }}
Comment on lines +28 to +30
args: >
-Dsonar.projectKey=TimKenobi_${{ github.event.repository.name }}
-Dsonar.projectName=${{ github.event.repository.name }}
Comment on lines +8 to +11
pull_request:
branches:
- main
- master
Comment on lines +24 to +26
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
@@ -0,0 +1,30 @@
name: SonarQube Analysis
- master

jobs:
sonarqube:
@TimKenobi TimKenobi merged commit 3f58688 into main May 6, 2026
3 of 4 checks passed
@TimKenobi TimKenobi deleted the add-sonarqube-workflow branch May 6, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants