22 lines
443 B
Bash
Executable File
22 lines
443 B
Bash
Executable File
#!/bin/sh -ex
|
|
|
|
# source environment from args
|
|
eval "$*"
|
|
|
|
cat <<EOF > /kaniko/.docker/config.json
|
|
{
|
|
"auths": {
|
|
"$ACTION_REGISTRY": {
|
|
"username": "$ACTION_USERNAME",
|
|
"password": "$ACTION_PASSWORD"
|
|
}
|
|
}
|
|
}
|
|
EOF
|
|
|
|
REGISTRY="$(echo "$ACTION_REGISTRY" | sed 's .*:// ')"
|
|
/kaniko/executor \
|
|
--context "${ACTION_DOCKERFILE%/*}" \
|
|
--dockerfile "$ACTION_DOCKERFILE" \
|
|
--destination "$REGISTRY/$ACTION_IMAGE:$ACTION_TAG"
|