-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.33 KB
/
ui-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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