Skip to content

Commit

Permalink
ci: build image for base
Browse files Browse the repository at this point in the history
  • Loading branch information
fearlessfe committed Aug 26, 2024
1 parent 215c850 commit c0861c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,13 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Build and push base Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}-base
labels: ${{ steps.meta.outputs.labels }}
build-args:
NEXT_PUBLIC_IS_BASE: "true"
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm && pnpm install

FROM node:20.16.0-alpine AS builder
ARG NEXT_PUBLIC_IS_BASE="false"
ENV NEXT_PUBLIC_IS_BASE=${NEXT_PUBLIC_IS_BASE}
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
Expand Down

0 comments on commit c0861c0

Please sign in to comment.