Skip to content

Commit

Permalink
ci: watch for build arg tag since it carries most recent release in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
thilobillerbeck committed Nov 19, 2024
1 parent 9eb3994 commit 77158a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
FROM node:20 AS base
ARG GIT_TAG
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app
RUN echo "$(git rev-parse --short HEAD) ($(git describe --tags --abbrev=0))" > .git-rev
RUN if [ -n "$GIT_TAG" ]; then \
VERSION="$GIT_TAG ($(git rev-parse --short HEAD))"; \
else \
VERSION="$(git describe --tags --abbrev=0) ($(git rev-parse --short HEAD))"; \
fi && \
echo $VERSION > .git-rev
RUN rm -rf .git

FROM base AS prod-deps
Expand Down

0 comments on commit 77158a5

Please sign in to comment.