From 845eb2dd43cad0d57c905a7585943db5902af13d Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 18:47:02 +0100 Subject: [PATCH] fix name logic --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b115ab..a112f68 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,6 @@ build: stage: build script: - echo Build started on `date` for $CI_COMMIT_REF_NAME - - if [[ "$CI_REGISTRY" =~ "master" ]]; then export build=latest done else build=$CI_REGISTRY fi + - if [[ "$CI_COMMIT_REF_NAME" =~ "master" ]]; then export build=latest; else export build=$CI_COMMIT_REF_NAME; fi - docker build -t richarvey/nginx-php-fpm:"$build" . - docker push richarvey/nginx-php-fpm:"$build"