From 50a27deca8bf9bbde7f55af53abb48f6be2ba44d Mon Sep 17 00:00:00 2001 From: jastornig Date: Tue, 19 Dec 2023 17:33:40 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df05582..b0ffa0e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,9 +24,11 @@ stages: # List of stages for jobs, and their order of execution build_job: image: "reactnativecommunity/react-native-android:latest" stage: build # This job runs in the build stage, which runs first. - # rules: - # - if: $COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH - # when: manual + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual + - if: $CI_MERGE_REQUEST_TARGET_BRANCH_PROTECTED + when: manual script: - echo BUILD_JOB_ID=$CI_JOB_ID >> environment.env - yarn add expo @@ -52,9 +54,11 @@ release_job: image: "registry.gitlab.com/gitlab-org/release-cli:latest" needs: - job: build_job - # rules: - # - if: $COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH - # when: manual + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual + - if: $CI_MERGE_REQUEST_TARGET_BRANCH_PROTECTED + when: manual release: tag_name: 'v0.$CI_PIPELINE_IID' description: 'v0.$CI_PIPELINE_IID create by pipeline'