mirror of
https://github.com/docker/login-action.git
synced 2025-04-23 23:26:37 +02:00
Enhance workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
175e20ba61
commit
4abf7e9de3
9 changed files with 197 additions and 29 deletions
23
hack/vendor.Dockerfile
Normal file
23
hack/vendor.Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
|||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue