From 2046213f9421dd1c8e8902b7db9c3a4990e34305 Mon Sep 17 00:00:00 2001 From: Fritz Hoeing Date: Fri, 28 Jun 2024 16:27:50 +0200 Subject: [PATCH 1/2] ci: sonarqube-scan does not run when merging from dependabot --- .github/workflows/build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 1e1176e7..da4cebba 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -66,7 +66,7 @@ jobs: run: mvn clean verify sonar:sonar --batch-mode -Dsonar.projectKey=SHOGun -Dsonar.login="${{ secrets.SONARQUBE_TOKEN }}" -Preporting - name: Refresh SonarQube - if: steps.semantic.outputs.new_release_published == 'true' + if: ${{ github.actor != 'dependabot[bot]' && steps.semantic.outputs.new_release_published == 'true' run: mvn compile sonar:sonar --batch-mode -Dsonar.projectKey=SHOGun -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} -Dsonar.login="${{ secrets.SONARQUBE_TOKEN }}" - name: Save cache From 08358625017c5563ebcac8c1e0cc05eda14d0fef Mon Sep 17 00:00:00 2001 From: FritzHoing <100765498+FritzHoing@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:48:25 +0200 Subject: [PATCH 2/2] Apply suggestions from code review --- .github/workflows/build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index da4cebba..05ca7f5e 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -66,7 +66,7 @@ jobs: run: mvn clean verify sonar:sonar --batch-mode -Dsonar.projectKey=SHOGun -Dsonar.login="${{ secrets.SONARQUBE_TOKEN }}" -Preporting - name: Refresh SonarQube - if: ${{ github.actor != 'dependabot[bot]' && steps.semantic.outputs.new_release_published == 'true' + if: ${{ github.actor != 'dependabot[bot]' }} && steps.semantic.outputs.new_release_published == 'true' run: mvn compile sonar:sonar --batch-mode -Dsonar.projectKey=SHOGun -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} -Dsonar.login="${{ secrets.SONARQUBE_TOKEN }}" - name: Save cache