From 706323beb1d336f57c84e9d04ca12d541a82dcd8 Mon Sep 17 00:00:00 2001 From: Rodolfo Olivieri Date: Thu, 9 Sep 2021 21:51:14 -0300 Subject: [PATCH] CI: Add statement to ensure workflow runs only on serenity This statement ensures that the `Sonar Cloud Static Analysis` workflow runs only for the official repository and not for the forks. --- .github/workflows/sonar-cloud-static-analysis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sonar-cloud-static-analysis.yml b/.github/workflows/sonar-cloud-static-analysis.yml index 265563a0f4..f2a6f06801 100644 --- a/.github/workflows/sonar-cloud-static-analysis.yml +++ b/.github/workflows/sonar-cloud-static-analysis.yml @@ -8,6 +8,7 @@ jobs: build: name: Static Analysis runs-on: ubuntu-latest + if: always() && github.repository == 'SerenityOS/serenity' && github.ref == 'refs/heads/master' env: # Latest scanner version is tracked on: https://sonarcloud.io/documentation/analysis/scan/sonarscanner/ SONAR_SCANNER_VERSION: 4.6.1.2450