27 lines
444 B
Bash
27 lines
444 B
Bash
|
#!/bin/sh -ex
|
||
|
|
||
|
# source environment from args
|
||
|
eval "$*"
|
||
|
|
||
|
ACTION=/kaniko/executor
|
||
|
|
||
|
cat <<EOF > /kaniko/.docker/config.json
|
||
|
{
|
||
|
"auths": {
|
||
|
"$ACTION_REGISTRY": {
|
||
|
"username": "$ACTION_USERNAME",
|
||
|
"password": "$ACTION_PASSWORD"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
EOF
|
||
|
|
||
|
case "$ACTION_TLS" in
|
||
|
[fF]alse) ACTION="$ACTION --insecure" ;;
|
||
|
*) ;;
|
||
|
esac
|
||
|
|
||
|
exec $ACTION \
|
||
|
--dockerfile "$ACTION_DOCKERFILE" \
|
||
|
--destination "$ACTION_REGISTRY/$ACTION_IMAGE"
|