-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from ultravioletrs/buildpipeline
NOISSUE - add UI build pipeline
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |