From e60506816fd8701650477e7d2101f877862bf24e Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 18:38:00 +0100 Subject: [PATCH] try and match tag/branch --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 153c56f..7ef202b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,7 @@ before_script: build: stage: build script: - - echo Build started on `date` - - docker build -t richarvey/nginx-php-fpm:latest . - - docker push richarvey/nginx-php-fpm:latest + - echo Build started on `date` for $CI_COMMIT_REF_NAME + - f [[ "$CI_REGISTRY" =~ "master" ]]; then export build=latest else build=$CI_REGISTRY fi + - docker build -t richarvey/nginx-php-fpm:"$build" . + - docker push richarvey/nginx-php-fpm:"$build"