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"