From 919349a76d423ea4c8b093d0d8241663f7e04711 Mon Sep 17 00:00:00 2001 From: Mathew Date: Wed, 21 Aug 2024 18:21:58 -0400 Subject: [PATCH] test 3, attempting to "pass" --- .github/workflows/client-sonarcloud.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/client-sonarcloud.yml b/.github/workflows/client-sonarcloud.yml index 6efed17a..c297de50 100644 --- a/.github/workflows/client-sonarcloud.yml +++ b/.github/workflows/client-sonarcloud.yml @@ -27,22 +27,22 @@ jobs: name: SonarCloud Analysis client runs-on: ubuntu-latest steps: - # Checkout the repo + - name: Check if PR is from a fork + id: check_fork + run: | + if [ "${{ github.event.pull_request.head.repo.fork }}" == "true" ]; then + echo "This is a PR from a fork, skipping sonarcloud analysis." + echo "SKIP_STEP=true" >> $GITHUB_ENV + fi + - name: Checkout repository + if: env.SKIP_STEP != 'true' uses: actions/checkout@v4 with: fetch-depth: 0 - # Analyze client with SonarCloud - - name: Skip notice - if: github.event.pull_request.head.repo.fork == true - run: echo "SonarCloud analysis skipped due to PR from fork." - - name: Check SonarCloud Token - run: | - if [ -z "${{ secrets.SONAR_TOKEN_CLIENT }}" ]; then - echo "SonarCloud token not found. Skipping SonarCloud analysis." - exit 0 - fi + - name: Analyze client with SonarCloud + if: env.SKIP_STEP != 'true' uses: SonarSource/sonarcloud-github-action@v2.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}