diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 774e9e19..4d31ea87 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -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 }} diff --git a/Dockerfile b/Dockerfile index e6b9d752..614a217a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM node:lts-alpine +# use with --build-arg VERSION=xxxx +ARG VERSION + # Working directory WORKDIR /app/tailchat @@ -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