瀏覽代碼

Add Registry and Closes #55

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