From c73f5af2143fd1b9133eb83a99ae7c7f9724b479 Mon Sep 17 00:00:00 2001
From: ThanKarab <tkarabatsis@hotmail.com>
Date: Tue, 11 Apr 2023 17:40:52 +0300
Subject: [PATCH] Pushing docker images to ebrains harbor.

---
 .github/workflows/publish_images.yml | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/publish_images.yml b/.github/workflows/publish_images.yml
index 36bb3c530..1c7c1ffed 100644
--- a/.github/workflows/publish_images.yml
+++ b/.github/workflows/publish_images.yml
@@ -21,11 +21,18 @@ jobs:
           username: ${{ secrets.DOCKER_USERNAME }}
           password: ${{ secrets.DOCKER_PASSWORD }}
 
+      - name: Log in to EBRAINS HARBOR
+        uses: docker/login-action@v2
+        with:
+          registry: docker-registry.ebrains.eu
+          username: ${{ secrets.HARBOR_USERNAME }}
+          password: ${{ secrets.HARBOR_PASSWORD }}
+
       - name: Extract metadata (tags, labels) for Docker
         id: meta
         uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
         with:
-          images: hbpmip/portal-backend
+          images: portal-backend
 
       - name: Load cached image
         uses: actions/cache@v2
@@ -40,7 +47,9 @@ jobs:
           context: .
           file: ./Dockerfile
           push: true
-          tags: ${{ steps.meta.outputs.tags }}
+          tags: |
+            hbpmip/${{ steps.meta.outputs.tags }}
+            docker-registry.ebrains.eu/medical-informatics-platform/${{ steps.meta.outputs.tags }}
           labels: ${{ steps.meta.outputs.labels }}
           cache-from: type=local,src=/tmp/.buildx-cache/portal-backend
           cache-to: type=local,dest=/tmp/.buildx-cache-new/portal-backend
-- 
GitLab