-
Notifications
You must be signed in to change notification settings - Fork 7
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
Split web driver e2e and screenshots action into two jobs #408
base: rc
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to speed up the build you might be able to use the COPY command. They have an example using go that looks like this:
FROM golang AS build
WORKDIR /app
RUN --mount=type=bind,target=. go build -o /myapp ./cmd
COPY --from=build /myapp /usr/bin/
So for example in the app docker file, you could do something like this where you add a final step that just copies the artifacts over:
FROM node:20.12.2 as base
RUN apt-get update
RUN apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev libnss3 -y
FROM base as node_modules
RUN mkdir /app
WORKDIR /app
COPY package*.json .
COPY yarn.lock .
RUN yarn install
FROM node_modules as build
WORKDIR /app
COPY . .
RUN yarn run webapp:build:dev
FROM node:20.12.2
WORKDIR /app
COPY --from=build /app/target .
I like this solution in general, but I don't think GitHub can currently take advantage of multi-stage builds because it always busts the build cache.
I agree with this optimization, but I also think we should look into caching the build process, so we can take advantage of the multi-stage build. We could use docker hub as a |
Looks like you can use git actions as a |
No description provided.