File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,22 +162,28 @@ push_architectures() {
162162build_and_push () {
163163 print_step " Building and pushing all images..."
164164
165- # Prepare tags
166- local tags=" --tag ${IMAGE_NAME} :${GIT_SHA} --tag ${IMAGE_NAME} :${GIT_SHA} -amd64 --tag ${IMAGE_NAME} :${GIT_SHA} -arm64"
167-
168- # Add version tags if this is a release
169- if [[ -n " ${GIT_TAG} " ]]; then
170- print_status " Adding version tags..."
171- tags=" ${tags} --tag ${IMAGE_NAME} :${GIT_TAG} --tag ${IMAGE_NAME} :${GIT_TAG} -amd64 --tag ${IMAGE_NAME} :${GIT_TAG} -arm64"
172- fi
173-
174165 # Build for both architectures and create manifest
175166 docker buildx build \
176167 --platform linux/amd64,linux/arm64 \
177- ${tags} \
168+ --tag ${IMAGE_NAME} :${GIT_SHA} \
169+ --tag ${IMAGE_NAME} :${GIT_SHA} -amd64 \
170+ --tag ${IMAGE_NAME} :${GIT_SHA} -arm64 \
178171 --file Dockerfile \
179172 --push \
180173 .
174+
175+ # Add version tags if this is a release
176+ if [[ -n " ${GIT_TAG} " ]]; then
177+ print_status " Adding version tags..."
178+ docker buildx build \
179+ --platform linux/amd64,linux/arm64 \
180+ --tag ${IMAGE_NAME} :${GIT_TAG} \
181+ --tag ${IMAGE_NAME} :${GIT_TAG} -amd64 \
182+ --tag ${IMAGE_NAME} :${GIT_TAG} -arm64 \
183+ --file Dockerfile \
184+ --push \
185+ .
186+ fi
181187}
182188
183189# Build only (no push)
You can’t perform that action at this time.
0 commit comments