build: version args

This commit is contained in:
Marvin Preuss 2022-12-12 11:56:28 +00:00
parent 49589a76d6
commit 366fe4e7a8

View File

@ -1,5 +1,9 @@
VERSION 0.6 VERSION 0.6
FROM golang:1.19.4-alpine3.16 ARG BUF_VERSION=1.10.0
ARG GOLANGCILINT_VERSION=1.50.1
ARG GO_VERSION=1.19.4
ARG PROTOGENGO_VERSION=1.28.1
FROM golang:$GO_VERSION-alpine3.16
WORKDIR /code WORKDIR /code
ci: ci:
@ -9,10 +13,11 @@ ci:
deps: deps:
RUN apk add --no-cache \ RUN apk add --no-cache \
build-base \ build-base \
git \
protoc protoc
RUN (cd /tmp; go install github.com/bufbuild/buf/cmd/buf@v1.10.0) RUN (cd /tmp; go install github.com/bufbuild/buf/cmd/buf@v$BUF_VERSION)
RUN (cd /tmp; go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1) RUN (cd /tmp; go install google.golang.org/protobuf/cmd/protoc-gen-go@v$PROTOGENGO_VERSION)
RUN (cd /tmp; go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1) RUN (cd /tmp; go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$GOLANGCILINT_VERSION)
build: build:
FROM +deps FROM +deps