From 0333c60b35be4c66d660a7a3cc6d690a8dc950c2 Mon Sep 17 00:00:00 2001 From: Isala Piyarisi Date: Mon, 21 Mar 2022 23:47:04 +0530 Subject: [PATCH] ci(inspector): Fixed a misconfigured path --- .github/workflows/build-inspector.yaml | 3 +-- inspector/Dockerfile | 12 +----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-inspector.yaml b/.github/workflows/build-inspector.yaml index 5173492..fd17223 100644 --- a/.github/workflows/build-inspector.yaml +++ b/.github/workflows/build-inspector.yaml @@ -18,7 +18,6 @@ jobs: defaults: run: shell: bash - working-directory: control-plane steps: - uses: actions/checkout@v2 - uses: docker/login-action@v1 @@ -26,6 +25,6 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - run: docker build -t $IMAGE_NAME:latest . + - run: docker build -t $IMAGE_NAME:latest -f inspector/Dockerfile . - run: docker tag $IMAGE_NAME:latest $IMAGE_NAME:commit-${GITHUB_SHA:0:8} - run: docker push $IMAGE_NAME --all-tags diff --git a/inspector/Dockerfile b/inspector/Dockerfile index 5644019..a55faf8 100644 --- a/inspector/Dockerfile +++ b/inspector/Dockerfile @@ -2,11 +2,8 @@ FROM node as ui-build WORKDIR /workspace -COPY ui/package.json ./ -COPY ui/package-lock.json ./ -RUN npm install --silent - COPY ui/ . +RUN npm install --silent RUN npm run build @@ -14,16 +11,9 @@ RUN npm run build FROM golang:1.17 as go-builder WORKDIR /workspace -# Copy the Go Modules manifests -COPY ./inspector/go.mod go.mod -COPY ./inspector/go.sum go.sum -# cache deps before building and copying source so that we don't need to re-download as much -# and so that source changes don't invalidate our downloaded layer -RUN go mod download COPY ./inspector/ ./ - # Copy UI build COPY --from=ui-build /workspace/dist/ ui/