diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e607ac..51a4c8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,8 @@ build: - npm run postinstall script: - npm run build + rules: + - if: '$CI_PIPELINE_SOURCE == "push"' compile: image: reactnativecommunity/react-native-android @@ -43,7 +45,7 @@ compile: reports: dotenv: job.env rules: - - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' test: image: reactnativecommunity/react-native-android @@ -60,6 +62,8 @@ test: - npm run postinstall script: - npm run test + rules: + - if: '$CI_PIPELINE_SOURCE == "push"' lint: image: reactnativecommunity/react-native-android @@ -76,6 +80,8 @@ lint: - npm run postinstall script: - npm run lint + rules: + - if: '$CI_PIPELINE_SOURCE == "push"' release: image: registry.gitlab.com/gitlab-org/release-cli @@ -95,7 +101,7 @@ release: - name: "app-release.apk" url: "https://git.karaolidis.com/karaolidis/terminally-online/-/jobs/$JOB_ID/artifacts/raw/android/app/build/outputs/apk/release/app-release.apk" rules: - - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' include: - template: Security/SAST.gitlab-ci.yml