Skip to content

Commit

Permalink
chore: 修改VERSION传递方式,从env改为build-arg
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Feb 2, 2023
1 parent 8161675 commit b317731
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
env:
VERSION: docker-${{ steps.meta.outputs.tags }}
build-args: VERSION=docker-${{ steps.meta.outputs.tags }}
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM node:lts-alpine

# use with --build-arg VERSION=xxxx
ARG VERSION

# Working directory
WORKDIR /app/tailchat

Expand Down Expand Up @@ -31,6 +34,7 @@ RUN pnpm install

# Build and cleanup (client and server)
ENV NODE_ENV=production
ENV VERSION=$VERSION
RUN pnpm run build

# web static service port
Expand Down

0 comments on commit b317731

Please sign in to comment.