#!/bin/bash DOCKER_USER=docker.io date=$(date "+%Y%m%d%H%M") version="v1.0.0_$date" : ${DOCKER_USER:? required} export GO111MODULE=on export GOPROXY=https://goproxy.cn # build webhook CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o webhook-example # build docker image docker build --no-cache -t ${DOCKER_USER}/webhook-example:${version} . rm -rf webhook-example #docker push ${DOCKER_USER}/webhook-example:${version}