Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,17 @@ ARG LICENSE_COPYRIGHT_HOLDER
ARG LICENSE_FILES
RUN --mount=type=bind,target=.,rw \
--mount=from=addlicense,source=/app/addlicense,target=/usr/bin/addlicense \
find . -regex "${LICENSE_FILES}" | xargs addlicense -c "${LICENSE_COPYRIGHT_HOLDER}" -l "${LICENSE_TYPE}" \
find . -regex "${LICENSE_FILES}" | xargs addlicense -v -c "${LICENSE_COPYRIGHT_HOLDER}" -l "${LICENSE_TYPE}" \
&& mkdir /out \
&& find . -regex "${LICENSE_FILES}" | cpio -pdm /out

FROM scratch AS license-update
COPY --from=set /out /
COPY --from=license-set /out /

FROM base AS license-validate
ARG LICENSE_ARGS
ARG LICENSE_TYPE
ARG LICENSE_COPYRIGHT_HOLDER
ARG LICENSE_FILES
RUN --mount=type=bind,target=. \
--mount=from=addlicense,source=/app/addlicense,target=/usr/bin/addlicense \
find . -regex "${LICENSE_FILES}" | xargs addlicense -check ${LICENSE_ARGS}
find . -regex "${LICENSE_FILES}" | xargs addlicense -v -check -c "${LICENSE_COPYRIGHT_HOLDER}" -l "${LICENSE_TYPE}"