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: