github.com/GoogleContainerTools/skaffold/v2@v2.13.2/docs-v1/content/en/samples/builders/custom-buildpacks/build.sh (about)

     1  #!/usr/bin/env bash
     2  set -e
     3  
     4  if ! [ -x "$(command -v ko)" ]; then
     5      GO111MODULE=on go get -mod=readonly github.com/google/ko/cmd/ko@v0.4.0
     6  fi
     7  
     8  output=$(ko publish --local --preserve-import-paths --tags= . | tee)
     9  ref=$(echo $output | tail -n1)
    10  
    11  docker tag $ref $IMAGE
    12  if $PUSH_IMAGE; then
    13      docker push $IMAGE
    14  fi