Template for a good new topic, formatted with Markdown:
- ALM used GitHub
- CI system used GitHub Actions
- Scanner command used when applicable
sonar-scanner \
-Dsonar.organization=ruuvi \
-Dsonar.projectKey=ruuvi_ruuvi.firmware.c \
-Dsonar.sources=./src \
-Dsonar.cfamily.build-wrapper-output=bw-output \
-Dsonar.cfamily.gcov.reportsPath=. \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
-Dsonar.pullrequest.github.token.secured=${{ secrets.GITHUB_TOKEN }}
- Languages of the repository: C
- Only if the SonarCloud project is public, the URL:
https://github.com/ruuvi/ruuvi.firmware.c
- Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
ERROR: Please add the secret GITHUB_TOKEN as an environment variable to your GitHub Actions workflow. See https://github.com/sonarsource/sonarcloud-github-action for more details.
- Steps to reproduce
- Open a pull request, everything is good
- Merge pull request, commit is considered as a push to master (?) and
-Dsonar.pullrequest.github.token.secured
has no effect.
- Potential workaround
Is theresonar.push.github.token.secured
or would sonar-scanner read the token from environment?