From eedde1884aee095ae3d4d28e77f1c3c8b427de55 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 7 Jan 2020 12:58:21 +0530 Subject: [PATCH] gitlab-ci.yml: Allow tagging images built on upstream branches If we're on the gstreamer namespace, we should push all images built on that namespace to the registry. This is needed to, f.ex., update the docker image used in stable builds. This is needed for: https://gitlab.freedesktop.org/gstreamer/cerbero/merge_requests/367 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad22b328da..6484336cbc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,9 +47,9 @@ test manifest: # Push the images to the upstream registry - | - if [ "$CI_COMMIT_REF_NAME" = "master" -a "$CI_PROJECT_NAMESPACE" = "gstreamer" ]; then + if [ "$CI_PROJECT_NAMESPACE" = "gstreamer" ]; then # Tag the image with the git ref - docker image tag ${LATEST} ${_UID} + docker image tag ${LATEST} ${_UID}-${CI_COMMIT_REF_NAME} # Push the tags docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY docker push ${_UID}