From c68c68b3b2af46d2934ef4abf1d1d0bebb59bde1 Mon Sep 17 00:00:00 2001 From: burnettk Date: Thu, 26 May 2022 13:34:19 -0400 Subject: [PATCH] just skip unless main --- .github/workflows/tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7bcb8444..8e4a97a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -209,9 +209,13 @@ jobs: - name: SonarCloud Scan uses: sonarsource/sonarcloud-github-action@master - # thought about just skipping dependabot, but skipping all pull requests seems better, since none of them will have access to sonarcloud + # thought about just skipping dependabot # if: ${{ github.actor != 'dependabot[bot]' }} - if: ${{ github.event_name != 'pull_request' }} + # but figured all pull requests seems better, since none of them will have access to sonarcloud. + # however, with just skipping pull requests, the build associated with "Triggered via push" is also associated with the pull request and also fails hitting sonarcloud + # if: ${{ github.event_name != 'pull_request' }} + # so just skip everything but main + if: github.ref_name == 'main' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}