From e35f903744738586bcca0a17fb014f32f5314f20 Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Wed, 7 Apr 2021 07:44:04 -0400 Subject: [PATCH] Update sonar upload to only run on main. --- .github/workflows/run-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 20c84c1..535e8bc 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -52,7 +52,8 @@ jobs: sonarcloud: name: SonarCloud runs-on: ubuntu-latest - if: ${{ secrets.SONAR_TOKEN }} + if: ${{ github.event == 'push' && github.ref == 'refs/heads/main' }} + needs: test steps: - uses: actions/checkout@v2 with: