From 53be32de34c64bb40c9bf05a25ffc3c4d085e249 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 4 Sep 2022 15:58:48 -0500 Subject: [PATCH] GitLab CI: only publish image on develop --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index edd3700aee..aaca197c3a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -144,14 +144,15 @@ pages: - develop docker: + stage: deploy image: docker:20.10.17 services: - - docker:20.10.17-dind + - docker:20.10.17-dind # https://medium.com/devops-with-valentine/how-to-build-a-docker-image-and-push-it-to-the-gitlab-container-registry-from-a-gitlab-ci-pipeline-acac0d1f26df script: - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin - docker build -t $CI_REGISTRY_IMAGE . - docker push $CI_REGISTRY_IMAGE - # only: - # refs: - # - develop \ No newline at end of file + only: + refs: + - develop \ No newline at end of file