# syntax=docker/dockerfile:1 ARG ALPINE_VERSION=3.20 FROM alpine:${ALPINE_VERSION} AS gen RUN apk add --no-cache git WORKDIR /src RUN --mount=type=bind,target=. < /out/AUTHORS cat /out/AUTHORS EOT FROM scratch AS update COPY --from=gen /out / FROM gen AS validate RUN --mount=type=bind,target=.,rw <&2 'ERROR: Authors result differs. Please update with "make authors"' git status --porcelain -- AUTHORS exit 1 fi EOT