diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 106ea10d3e01c313ca27e2590b9f8480b28b87df..211fc614e54b2bd23975f92a573f9afddac0216f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -92,24 +92,27 @@ builder:
     - echo "Creating builder image for ${BUILDER_TARGET}"
     - make ${BUILDER_TARGET}
 
+.config:
+  stage: config
+  script:
+    - bash containers/release/configure_release.sh ${BRANCH}
+  artifacts:
+    paths:
+      - config
 config:stable:
+  extends: .config
   image: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:latest
-  stage: config
   only:
     - tags
     - master
-  script:
-   - bash containers/release/configure_release.sh latest
 config:unstable:
+  extends: .config
   image: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:unstable
-  stage: config
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH != "develop"'
       when: manual
     - if: '$CI_COMMIT_BRANCH == "develop"'
       when: on_success
-  script:
-    - bash containers/release/configure_release.sh unstable
       
 release:
   stage: slim
diff --git a/containers/release/configure_release.sh b/containers/release/configure_release.sh
index 0354ac43045b306fc199453d94c9a525771dad24..bae5f1cbc478a411eb6bfdd8dc2212754805b732 100644
--- a/containers/release/configure_release.sh
+++ b/containers/release/configure_release.sh
@@ -9,7 +9,12 @@ mkdir -p config
 
 cp /etc/profile.d/z10_spack_environment.sh config/spack-env.sh
 
-export TAG=$1
+export BRANCH=$1
+if [ ${BRANCH} == "release" ];
+  export TAG="latest"
+else
+  export TAG="unstable"
+fi
 
 ## Spack sets the man-path, which stops bash from using the default man-path
 ## We can fix this by appending a trailing colon to MANPATH