-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from kimwnasptd/feature-kimwnasptd-arm
CI: Extend GH Actions to also build for ARM
- Loading branch information
Showing
2 changed files
with
25 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
IMG ?= kserve/models-web-app | ||
TAG ?= $(shell git describe --tags --always --dirty) | ||
ARCH ?= linux/amd64 | ||
|
||
# We want the git tag to be the last commit to this directory so we don't | ||
# bump the image on unrelated changes. | ||
GIT_TAG ?= $(shell git log -n 1 --pretty=format:"%h" ./) | ||
|
||
docker-build: | ||
docker build -t $(IMG):$(GIT_TAG) . | ||
docker build -t ${IMG}:${TAG} . | ||
|
||
docker-push: | ||
docker push $(IMG):$(GIT_TAG) | ||
docker push $(IMG):$(TAG) | ||
|
||
.PHONY: docker-build-multi-arch | ||
docker-build-multi-arch: ## Build multi-arch docker images with docker buildx | ||
docker buildx build --platform ${ARCH} --tag ${IMG}:${TAG} . | ||
|
||
image: docker-build docker-push | ||
|
||
# Prettier UI format check. | ||
prettier-check: | ||
npm run format:check --prefix frontend | ||
.PHONY: docker-build-push-multi-arch | ||
docker-build-push-multi-arch: ## Build multi-arch docker images with docker buildx and push to docker registry | ||
docker buildx build --platform ${ARCH} --tag ${IMG}:${TAG} --push . | ||
|
||
image: docker-build docker-push |