From 08f74091854c2e1fd27e3955e8f2f9c9efecd823 Mon Sep 17 00:00:00 2001
From: Richard Glosner <xglosner@fi.muni.cz>
Date: Mon, 17 Mar 2025 14:32:18 +0100
Subject: [PATCH] internal: make preferred branch CI variable

---
 .gitlab-ci.yml | 2 +-
 README.md      | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d1a1575..0cbe50d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,7 @@ image: python:3.10-bullseye
 
 variables:
   GIT_SUBMODULE_STRATEGY: normal
-  PREFERRED_BRANCH: "citadel"  # Change this to your actual release branch name
+  PREFERRED_BRANCH: $PREFERRED_BRANCH
   MAIN_BRANCH: "main"
 
 stages:
diff --git a/README.md b/README.md
index c266653..f448213 100644
--- a/README.md
+++ b/README.md
@@ -362,6 +362,10 @@ Also, the main branch should never have a valid gitlab-ci.yml that can publish p
 For that reason the tag `only:` on the main branch of the project should be set to a different name other than the main branch.
 On the main branch, the tag is set to `change-me`, you need to change all of the occurrences of this tag to the current branch name.
 
+### 5. Update PREFERRED_BRANCH CI/CD variable
+
+To allow automatic propagation of changes from the newest release to the main, we need to update the value of `PREFERRED_BRANCH` variable to the name of the new release branch.
+
 ### 5. Publishing
 
 When all of the previous steps are done, you can run the manual stage `pages`, which deploys the newest changes.
-- 
GitLab