Merge pull request #18008 from dvdksn/modules-vendor-bake

chore: add vendor target for bake
This commit is contained in:
David Karlsson 2023-08-23 20:25:59 +02:00 committed by GitHub
commit 1b8a23cfdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -42,3 +42,14 @@ WORKDIR /test
COPY --from=build /out ./public
ADD .htmltest.yml .htmltest.yml
RUN htmltest
FROM build-base as update-modules
ARG MODULE="-u"
WORKDIR /src
COPY . .
RUN hugo mod get ${MODULE}
RUN hugo mod vendor
FROM scratch as vendor
COPY --from=update-modules /src/_vendor /_vendor
COPY --from=update-modules /src/go.* /

View File

@ -140,3 +140,11 @@ target "aws-cloudfront-update" {
no-cache-filter = ["aws-cloudfront-update"]
output = ["type=cacheonly"]
}
target "vendor" {
target = "vendor"
args = {
MODULE = null
}
output = ["."]
}