Skip to content

Commit

Permalink
Merge pull request #31 from ultravioletrs/buildpipeline
Browse files Browse the repository at this point in the history
NOISSUE - add UI build pipeline
  • Loading branch information
drasko authored Nov 8, 2024
2 parents 0a09dc0 + ffeaaef commit f6d6aa9
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ui-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright (c) Ultraviolet
# SPDX-License-Identifier: Apache-2.0

name: Build and Publish Cube AI UI Docker Image

on:
schedule:
- cron: '0 8 * * 6'
push:
branches: [main]

env:
REGISTRY: ghcr.io

jobs:
build-and-push-image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout Cube repository
uses: actions/checkout@v4
with:
path: cube

- name: Checkout UI repository
uses: actions/checkout@v4
with:
repository: absmach/magistrala-ui-new
path: ui
token: ${{ secrets.GITHUBPAT }}

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUBPAT }}

- name: Set UI Type in .env File
run: |
sed -i 's/^NEXT_PUBLIC_UI_TYPE=.*/NEXT_PUBLIC_UI_TYPE=cube-ai/' ui/.env
- name: Build and Push Cube AI UI Docker Image
run: |
cd ui
CONFIG_DIR_SOURCE=../cube/ui make dockers_cube_ai
docker tag ${{ env.REGISTRY }}/absmach/magistrala-ui-new/ui-cube-ai:latest ${{ env.REGISTRY }}/ultravioletrs/cube/ui:latest
docker push ${{ env.REGISTRY }}/ultravioletrs/cube/ui:latest

0 comments on commit f6d6aa9

Please sign in to comment.