Skip to content

Commit 51f3df7

Browse files
committed
Dockerfile: fmt-proto stage with bake def
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
1 parent f8ec35b commit 51f3df7

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ RUN --mount=type=bind,target=. \
106106
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
107107
golangci-lint run ./...
108108

109+
FROM gobase AS fmt-proto
110+
RUN --mount=type=bind,target=. \
111+
make fmt-proto
112+
109113
# use generate-base to have protoc available
110114
FROM generate-base
111115
ENV GO111MODULE=on

docker-bake.hcl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,20 @@ group "validate" {
1515
targets = ["lint", "vendor-validate", "generate-validate"]
1616
}
1717

18-
target "lint" {
18+
group "lint" {
19+
targets = ["golangci-lint", "fmt-proto"]
20+
}
21+
22+
target "golangci-lint" {
1923
target = "lint"
2024
output = ["type=cacheonly"]
2125
}
2226

27+
target "fmt-proto" {
28+
target = "fmt-proto"
29+
output = ["type=cacheonly"]
30+
}
31+
2332
target "vendor-validate" {
2433
target = "vendor-validate"
2534
output = ["type=cacheonly"]

0 commit comments

Comments
 (0)