Skip to content

Commit

Permalink
Update CI to build OSCAR-UI before docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
srisco committed Jul 14, 2020
1 parent 08acabc commit a51174f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@ on:
types: [created]

jobs:
buildx:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/[email protected]

- name: Prepare
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '14'

- name: Build OSCAR-UI
run: npm install && npm run build
working-directory: ./ui

- name: Prepare docker buildx
id: prepare
run: |
DOCKER_IMAGE=grycap/oscar
Expand Down
11 changes: 1 addition & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ RUN GOOS=${GOOS} CGO_ENABLED=0 go build --ldflags "-s -w \
-a -installsuffix cgo -o oscar .


FROM node:14.5-alpine as ui-build

COPY ui /ui
WORKDIR /ui

RUN npm install && \
npm run build


FROM alpine:3.11

LABEL org.label-schema.license="Apache 2.0" \
Expand All @@ -46,7 +37,7 @@ EXPOSE 8080

COPY --from=build /oscar/oscar .

COPY --from=ui-build /ui/dist assets
COPY /ui/dist assets

RUN chown -R app:app ./

Expand Down

0 comments on commit a51174f

Please sign in to comment.