summaryrefslogtreecommitdiff
path: root/.github/workflows/sonar-cloud-static-analysis.yml
diff options
context:
space:
mode:
authorRodolfo Olivieri <rodolfo.olivieri3@gmail.com>2021-09-09 21:51:14 -0300
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-09-10 01:20:39 +0000
commit706323beb1d336f57c84e9d04ca12d541a82dcd8 (patch)
tree54e9c2c881ad644abc8d6179151f1f1d9368ce03 /.github/workflows/sonar-cloud-static-analysis.yml
parent3164e22f9b323d31384010f6c3d09a86aeeba7ae (diff)
downloadserenity-706323beb1d336f57c84e9d04ca12d541a82dcd8.zip
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.
Diffstat (limited to '.github/workflows/sonar-cloud-static-analysis.yml')
-rw-r--r--.github/workflows/sonar-cloud-static-analysis.yml1
1 files changed, 1 insertions, 0 deletions
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