kaniko/build.sh

28 lines
486 B
Bash
Raw Normal View History

2024-04-28 21:16:33 +00:00
#!/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 \
2024-04-30 17:35:40 +00:00
--context "${ACTION_DOCKERFILE%/*}" \
2024-04-28 21:16:33 +00:00
--dockerfile "$ACTION_DOCKERFILE" \
--destination "$ACTION_REGISTRY/$ACTION_IMAGE"