Permalink
Cannot retrieve contributors at this time
23 lines (19 sloc)
675 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
login-action/hack/vendor.Dockerfile
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax=docker/dockerfile:1.2 | |
ARG NODE_VERSION | |
FROM node:${NODE_VERSION}-alpine AS base | |
RUN apk add --no-cache git | |
WORKDIR /src | |
FROM base AS vendored | |
RUN --mount=type=bind,target=.,rw \ | |
--mount=type=cache,target=/src/node_modules \ | |
yarn install && mkdir /out && cp yarn.lock /out | |
FROM scratch AS update | |
COPY --from=vendored /out / | |
FROM vendored AS validate | |
RUN --mount=type=bind,target=.,rw \ | |
git add -A && cp -rf /out/* .; \ | |
if [ -n "$(git status --porcelain -- yarn.lock)" ]; then \ | |
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor-update"'; \ | |
git status --porcelain -- yarn.lock; \ | |
exit 1; \ | |
fi |