Yoginth преди 6 години
родител
ревизия
b8c6fac3bd
променени са 1 файла, в които са добавени 16 реда и са изтрити 0 реда
  1. 16 0
      .gitlab-ci.yml

+ 16 - 0
.gitlab-ci.yml

@@ -145,5 +145,21 @@ DockerHub:
       - docker login -u yoginth -p $CI_REGISTRY_PASSWORD docker.io
       - docker build -t gitote/gitote .
       - docker push gitote/gitote:latest
+    only:
+      - master
+
+Registry:
+    image: docker:latest
+    stage: deploy
+    services:
+      - docker:dind
+    script:
+      - mkdir -p $GOPATH/src/gitote
+      - cd $GOPATH/src/gitote
+      - git clone https://gitlab.com/gitote/gitote.git gitote
+      - cd gitote
+      - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+      - docker build -t registry.gitlab.com/gitote/gitote .
+      - docker push registry.gitlab.com/gitote/gitote:latest
     only:
       - master