summaryrefslogtreecommitdiff
path: root/build
blob: f64eeaf6eaaa376b64ae7b5a190afdb39eb72c3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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}