Update Sonar token reference in build workflow - #17
Open
damesx04 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Sonar token secret reference in the GitHub Actions build workflow from SONARCLOUD_TOKEN to SONAR_TOKEN.
Key Changes
- Modified the environment variable reference in the SonarQube scan step to use a different GitHub secret name
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| uses: SonarSource/sonarqube-scan-action@v4 | ||
| env: | ||
| SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} # Put the name of your token here | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Put the name of your token here |
There was a problem hiding this comment.
The secret name is being changed from SONARCLOUD_TOKEN to SONAR_TOKEN, but the configuration in sonar-project.properties indicates this is a SonarCloud setup (contains sonar.organization which is SonarCloud-specific). While the sonarqube-scan-action accepts SONAR_TOKEN as the environment variable name for both SonarQube and SonarCloud, the original name SONARCLOUD_TOKEN was more descriptive for this SonarCloud setup.
Consider:
- If this is intentional to standardize on
SONAR_TOKEN, ensure the GitHub secret is renamed fromSONARCLOUD_TOKENtoSONAR_TOKENin the repository settings, or - Keep using
SONARCLOUD_TOKENfor clarity since this is a SonarCloud setup, not a self-hosted SonarQube instance.
Suggested change
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Put the name of your token here | |
| SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} # Put the name of your SonarCloud token here |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.