From 61d9c0c9514799ac85d62fe0cc9f298bdbf75b20 Mon Sep 17 00:00:00 2001 From: avlcodemonkey Date: Tue, 28 Jul 2026 10:56:23 -0400 Subject: [PATCH] Don't run sonar on merge to main. --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cdd9bff..7c8313b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,9 +45,11 @@ jobs: path: '**/*.trx' reporter: dotnet-trx + # only run sonarqube on pull requests, not on a push into `main` scan: name: SonarQube Scan runs-on: ubuntu-latest + if: github.ref_name != 'main' && github.head_ref != 'main' steps: - uses: actions/checkout@v7.0.0 @@ -63,7 +65,7 @@ jobs: release: name: Release runs-on: ubuntu-latest - needs: [build-client, scan] + needs: [build-client] permissions: contents: write # Give the default GITHUB_TOKEN write permission to commit version change if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' && success() }}