From b58c5123e05a905a37b300b006027d2bbcb42c31 Mon Sep 17 00:00:00 2001 From: Rodney Osodo Date: Wed, 6 Nov 2024 12:22:06 +0300 Subject: [PATCH] fix: use latest stable magistrala after 0.14.0 Signed-off-by: Rodney Osodo --- .github/workflows/push-magistrala.yaml | 47 ++++++++++++++++++++++++++ docker/magistrala-compose.yaml | 6 ++-- 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/push-magistrala.yaml diff --git a/.github/workflows/push-magistrala.yaml b/.github/workflows/push-magistrala.yaml new file mode 100644 index 0000000..5cc0ede --- /dev/null +++ b/.github/workflows/push-magistrala.yaml @@ -0,0 +1,47 @@ +# Copyright (c) Ultraviolet +# SPDX-License-Identifier: Apache-2.0 + +name: Build and Publish Magistrala Docker Image + +on: + workflow_dispatch: + +env: + REGISTRY: ghcr.io + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout main repository + uses: actions/checkout@v4 + + - name: Clone Magistrala repository + uses: actions/checkout@v4 + with: + repository: absmach/magistrala + ref: eb513e19df7371f0d01f5560566f230f6b267bac + path: magistrala + + - name: Set up Docker Build + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and Push Magistrala Docker Image + run: | + cd magistrala + MG_DOCKER_IMAGE_NAME_PREFIX="ghcr.io/ultravioletrs/cube" make docker_auth docker_invitations docker_users -j $(nproc) + docker push ghcr.io/ultravioletrs/cube/auth:latest + docker push ghcr.io/ultravioletrs/cube/invitations:latest + docker push ghcr.io/ultravioletrs/cube/users:latest diff --git a/docker/magistrala-compose.yaml b/docker/magistrala-compose.yaml index b027032..925c6ec 100644 --- a/docker/magistrala-compose.yaml +++ b/docker/magistrala-compose.yaml @@ -86,7 +86,7 @@ services: - cube-network auth: - image: magistrala/auth:${MG_RELEASE_TAG} + image: ghcr.io/ultravioletrs/cube/auth:${MG_RELEASE_TAG} container_name: magistrala-auth depends_on: - auth-db @@ -175,7 +175,7 @@ services: - cube-network users: - image: magistrala/users:${MG_RELEASE_TAG} + image: ghcr.io/ultravioletrs/cube/users:${MG_RELEASE_TAG} container_name: magistrala-users depends_on: - users-db @@ -266,7 +266,7 @@ services: - cube-network invitations: - image: magistrala/invitations:${MG_RELEASE_TAG} + image: ghcr.io/ultravioletrs/cube/invitations:${MG_RELEASE_TAG} container_name: magistrala-invitations restart: on-failure depends_on: