Skip to content

Commit

Permalink
Fix SonarCloud integration
Browse files Browse the repository at this point in the history
GitHub Actions does currently not allow to provide secrets for a
workflow to a fork[1]. This means, SonarCloud works fine on branches
and pull requests within the same repository, but not across forks
as the forks will never know the sonar token.

At the moment, the only way to achieve integration for all PRs is
to hard-code the token into the workflow file for GitHub Actions.
We could also add it to the Gradle script, but it makes more sense
to keep it out of the build and in the CI configuration

PR: #206 (and experiments in #207)
Issue: no specific one, but belongs to #192
Related: 4f3647f

[1] https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#using-encrypted-secrets-in-a-workflow
  • Loading branch information
Simon Schrottner committed Mar 30, 2020
1 parent 0150796 commit 6fe755b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: "61ab2579215aa8a0024a2f9368fc1298fdecfd18"
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
run: ./gradlew jacocoTestReport sonarqube --stacktrace -i

Expand Down

0 comments on commit 6fe755b

Please sign in to comment.