ci: use ko.build to build docker image
This commit is contained in:
parent
2208f60f21
commit
187e7d1c16
1 changed files with 4 additions and 3 deletions
|
|
@ -9,9 +9,10 @@ build:
|
|||
variables:
|
||||
IMAGE: $CI_REGISTRY_IMAGE
|
||||
TAG: $CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
|
||||
KO_DOCKER_REPO: $IMAGE:$TAG
|
||||
before_script:
|
||||
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||
- docker info
|
||||
- wget https://github.com/ko-build/ko/releases/latest/download/ko_Linux_x86_64.tar.gz
|
||||
- tar -xzvf ko_Linux_x86_64.tar.gz -C /usr/local/bin
|
||||
script:
|
||||
- docker buildx create --name yggdrasil --use
|
||||
- docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE:$TAG --push .
|
||||
- ko build --platform=linux/arm64,linux/amd64 ./cmd/yggdrasil
|
||||
|
|
|
|||
Reference in a new issue