Update Dockerfile #15
This file contains hidden or 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
name: Build & Deployment LVIS UI Prototype | |
on: | |
push: | |
paths: | |
- 'prototype/lvis-ui/**' | |
pull_request: | |
paths: | |
- 'prototype/lvis-ui/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
VERSION: '0.0.1' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.16.0 | |
cache-dependency-path: './prototype/lvis-ui/package-lock.json' | |
cache: 'npm' | |
- name: Docker Login | |
env: | |
DOCKER_USER: ${{secrets.DOCKER_USERNAME}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
- name: Install modules for lvis-ui | |
working-directory: ./prototype/lvis-ui | |
run: npm i | |
- name: Build lvis-ui | |
working-directory: ./prototype/lvis-ui | |
run: npm run build --if-present | |
- name: Build lvis-ui Image | |
working-directory: ./prototype/lvis-ui | |
run: docker build --no-cache -t thaihv/lvis-ui0:$VERSION --file Dockerfile . | |
- name: Docker Push lvis-ui | |
run: docker push thaihv/lvis-ui0:$VERSION | |