diff --git a/.gitlab/ci_templates/helm_package.yml b/.gitlab/ci_templates/helm_package.yml
index 78b87dafabecc4a336905b2ef28f1cadab0560de..08eaf68285d0e2af15fc095d8082298d3a2c1076 100644
--- a/.gitlab/ci_templates/helm_package.yml
+++ b/.gitlab/ci_templates/helm_package.yml
@@ -49,14 +49,14 @@ package-chart:
   extends:
     - .chart_release_rules
 
-# Push helm chart. Charts on the `main` branch are pushed to `stable`, others
+# Push helm chart. Charts on the default branch are pushed to `stable`, others
 # are pushed to the `unstable` channel.
 release-helm:
   image: "rancher/curlimages-curl:7.73.0"
   stage: release-helm-chart
   script:
     - cd ${CHART_DIR:-"."}
-    - if [ "$CI_COMMIT_BRANCH" == "main" ]; then export HELM_CHANNEL='stable'; else export HELM_CHANNEL='unstable'; fi
+    - if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then export HELM_CHANNEL='stable'; else export HELM_CHANNEL='unstable'; fi
     - export CHART_FILE=$(ls ${CHART_NAME}-*.tgz)
     - curl --fail --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@${CHART_FILE}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/${HELM_CHANNEL}/charts"
   extends: