23 lines
438 B
Bash
Executable File
23 lines
438 B
Bash
Executable File
#!/bin/sh -ex
|
|
|
|
[ -f .env ] && . ./.env
|
|
|
|
cat <<EOF > /kaniko/.docker/config.json
|
|
{
|
|
"auths": {
|
|
"$GITHUB_SERVER_URL": {
|
|
"username": "$INPUT_USERNAME",
|
|
"password": "$INPUT_PASSWORD"
|
|
}
|
|
}
|
|
}
|
|
EOF
|
|
|
|
[ -z "$IMAGEAPP" ] && IMAGEAPP="$${REGISTRY#*://}/$INPUT_IMAGE"
|
|
|
|
/kaniko/executor \
|
|
--cache="${INPUT_CACHE}" \
|
|
--context "${INPUT_DOCKERFILE%/*}" \
|
|
--dockerfile "$INPUT_DOCKERFILE" \
|
|
--destination "$IMAGEAPP"
|