فهرست منبع

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