Update .gitlab-ci.yml file

This commit is contained in:
jastornig 2023-12-19 16:10:14 +00:00
parent c5795c9227
commit 5b31353c5d

View file

@ -25,9 +25,9 @@ build_job:
image: "reactnativecommunity/react-native-android:latest" image: "reactnativecommunity/react-native-android:latest"
stage: build # This job runs in the build stage, which runs first. stage: build # This job runs in the build stage, which runs first.
rules: rules:
- if: $COMMIT_BRANCH == "main" - if: $COMMIT_BRANCH == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
when: manual when: manual
- if: $COMMIT_BRANCH != "main" - if: $COMMIT_BRANCH != "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "main"
when: never when: never
script: script:
- echo BUILD_JOB_ID=$CI_JOB_ID >> environment.env - echo BUILD_JOB_ID=$CI_JOB_ID >> environment.env
@ -56,9 +56,9 @@ release_job:
needs: needs:
- job: build_job - job: build_job
rules: rules:
- if: $COMMIT_BRANCH == "main" - if: $COMMIT_BRANCH == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
when: manual when: manual
- if: $COMMIT_BRANCH != "main" - if: $COMMIT_BRANCH != "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "main"
when: never when: never
release: release: