From f101298baf83b898410979ec518d6f2477340ad3 Mon Sep 17 00:00:00 2001 From: avinashtrivedi Date: Fri, 31 Mar 2023 16:27:44 +0530 Subject: [PATCH] allow dkp push from other branches --- knowledge-portal/source/.gitlab-ci.yml | 5 +++-- knowledge-portal/source/README.md | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/knowledge-portal/source/.gitlab-ci.yml b/knowledge-portal/source/.gitlab-ci.yml index 608c1a1..2cb1105 100644 --- a/knowledge-portal/source/.gitlab-ci.yml +++ b/knowledge-portal/source/.gitlab-ci.yml @@ -13,7 +13,8 @@ copy-to-central-git: script: - bash -c "$(curl -fsSL https://github.com/detecttechnologies/Gitlab-CI-CD-Templates/raw/main/knowledge-portal/source/initiate-push-to-central.sh)" rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - when: manual - if: $CI_COMMIT_BRANCH == "main" when: always + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + when: never + - when : manual diff --git a/knowledge-portal/source/README.md b/knowledge-portal/source/README.md index 5b84883..54f293b 100644 --- a/knowledge-portal/source/README.md +++ b/knowledge-portal/source/README.md @@ -17,6 +17,8 @@ variables: GIT_STRATEGY: clone ``` +**Note: The pipeline can be added to any branch.** On `main`, it runs automatically and on other branches, it needs to be trigerred manually. + ### Connect your Source Git repository to the Knowledge Portal Here is an example of a `docs-manifest.toml` file that you can use to create your own and connect your repository to knowledge portal: