build: private repository support for drone / goreleaser
This commit is contained in:
parent
537ee53384
commit
b5420f9dbd
@ -4,6 +4,15 @@ set -euo pipefail
|
||||
|
||||
go install github.com/goreleaser/goreleaser@v1.22.1
|
||||
|
||||
if [ ! -z "$harbor_username"]; then
|
||||
DOCKER_FILE=~/.docker/config.json
|
||||
if [ ! -e $DOCKER_FILE ]; then
|
||||
mkdir -p ~/.docker/
|
||||
export harbor_auth=`cat /dev/null | jq -s -r '[ env.harbor_username, env.harbor_password ] | join(":") | @base64'`
|
||||
echo '{"auths":{"harbor.ntppool.org":{"auth":""}}}' | jq '.auths["harbor.ntppool.org"].auth=env.harbor_auth' > $DOCKER_FILE
|
||||
fi
|
||||
fi
|
||||
|
||||
DRONE_TAG=${DRONE_TAG-""}
|
||||
|
||||
is_snapshot=""
|
||||
|
Loading…
x
Reference in New Issue
Block a user