mirror of https://github.com/docker/cli.git
26 lines
556 B
Docker
26 lines
556 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG ALPINE_VERSION=3.20
|
|
|
|
FROM alpine:${ALPINE_VERSION} AS gen
|
|
RUN apk add --no-cache bash git
|
|
WORKDIR /src
|
|
RUN --mount=type=bind,target=. \
|
|
mkdir /out && ./scripts/docs/generate-authors.sh /out
|
|
|
|
FROM scratch AS update
|
|
COPY --from=gen /out /
|
|
|
|
FROM gen AS validate
|
|
RUN --mount=type=bind,target=.,rw <<EOT
|
|
set -e
|
|
git add -A
|
|
cp -rf /out/* .
|
|
diff=$(git status --porcelain -- AUTHORS)
|
|
if [ -n "$diff" ]; then
|
|
echo >&2 'ERROR: Authors result differs. Update with "make -f docker.Makefile authors"'
|
|
echo "$diff"
|
|
exit 1
|
|
fi
|
|
EOT
|