build: run versions command in the slim stage (#5127)

Move the invocation of the command to build the linter versions file in
the slim stage because we run it again in the standard stage anyway, so
there's no need for the standard stage to wait for this command to run.
This commit is contained in:
Marco Ferrari 2024-01-11 21:30:18 +01:00 committed by GitHub
parent 4a28fc5e73
commit d5da0ceac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -394,13 +394,13 @@ COPY TEMPLATES /action/lib/.automation
################################# #################################
COPY lib /action/lib COPY lib /action/lib
# Run to build version file and validate image
RUN ACTIONS_RUNNER_DEBUG=true WRITE_LINTER_VERSIONS_FILE=true IMAGE="${IMAGE}" /action/lib/linter.sh
ENTRYPOINT ["/action/lib/linter.sh"] ENTRYPOINT ["/action/lib/linter.sh"]
FROM base_image as slim FROM base_image as slim
# Run to build version file and validate image
RUN ACTIONS_RUNNER_DEBUG=true WRITE_LINTER_VERSIONS_FILE=true IMAGE="${IMAGE}" /action/lib/linter.sh
# Set build metadata here so we don't invalidate the container image cache if we # Set build metadata here so we don't invalidate the container image cache if we
# change the values of these arguments # change the values of these arguments
ARG BUILD_DATE ARG BUILD_DATE