diff options
| author | linxin <[email protected]> | 2023-03-13 17:44:41 +0800 |
|---|---|---|
| committer | linxin <[email protected]> | 2023-03-13 17:44:41 +0800 |
| commit | 0b7594348a0686b7d46f63789ef7a55662b63bb9 (patch) | |
| tree | 71c94641a3c146aef342032a2f375c747f5b7888 /build | |
| parent | 66db1a56eb768b4e1aa643a175b7112324bea9a3 (diff) | |
Diffstat (limited to 'build')
| -rw-r--r-- | build | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,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} |
