From 552c8deb747856f7dd43ecf1f7f5cd73714a69ae Mon Sep 17 00:00:00 2001 From: Gary O'Neall Date: Wed, 23 Mar 2022 03:25:22 -0700 Subject: [PATCH] Check for sonar credentials in Github Action Resolves issue #129 Signed-off-by: Gary O'Neall --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f772715..d929e55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,4 +38,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar + run: | + if [[ $SONAR_TOKEN != "" ]]; then + mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar + else + mvn --batch-mode --update-snapshots verify + fi