Skip to content

Only invalidate ui build layer when NEXT_PUBLIC_GIT value changes #1152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
COPY ./ui/tsconfig.json ./ui/next.config.js ./ui/next-env.d.ts ./ui/tailwind.config.js ./ui/postcss.config.js ./ui/convert-theme-to-ts.js ./ui/theme.js ./ui/graphql.schema.json ./ui/
COPY ./test-db-manager/rollup.config.mjs ./test-db-manager/tsconfig.json ./test-db-manager/

ARG NEXT_PUBLIC_GIT_HASH=unknown
RUN yarn ws:db run build
ARG NEXT_PUBLIC_GIT_HASH=unknown
RUN yarn ws:ui run build

FROM nginx:1.24.0-alpine
Expand All @@ -21,4 +21,4 @@
COPY --from=build /app/ui/out /usr/share/nginx/html
COPY scripts/docker/replace-environment-variables.sh /tmp
RUN curl -o /tmp/read-secrets.sh "https://raw.githubusercontent.com/HSLdevcom/jore4-tools/main/docker/read-secrets.sh"
CMD /bin/sh -c 'source /tmp/read-secrets.sh && /tmp/replace-environment-variables.sh && nginx -g "daemon off;"'

Check warning on line 24 in Dockerfile

View workflow job for this annotation

GitHub Actions / Publish UI Docker image to ACR / shared_build_and_publish_docker_image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/