build: use cache to build go binary
This commit is contained in:
parent
8740f5eaf9
commit
41f99b7f57
@ -27,7 +27,7 @@ image_build(){
|
|||||||
|
|
||||||
printf "\n\nBuild go binary %s\n\n" "${BINARY}.${binary_suffix}"
|
printf "\n\nBuild go binary %s\n\n" "${BINARY}.${binary_suffix}"
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} GOARM=${GOARM} go build -mod vendor -a ${GOTAGS} -o "build/${BINARY}.${binary_suffix}" ./cmd/${BINARY}/
|
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} GOARM=${GOARM} go build -mod vendor ${GOTAGS} -o "build/${BINARY}.${binary_suffix}" ./cmd/${BINARY}/
|
||||||
|
|
||||||
buildah --os "$GOOS" --arch "$GOARCH" $VARIANT --name "$containerName" from gcr.io/distroless/static
|
buildah --os "$GOOS" --arch "$GOARCH" $VARIANT --name "$containerName" from gcr.io/distroless/static
|
||||||
buildah config --user 1234 "$containerName"
|
buildah config --user 1234 "$containerName"
|
||||||
|
Loading…
Reference in New Issue
Block a user