kaniko/build.sh

23 lines
438 B
Bash
Raw Normal View History

2024-05-02 15:10:52 +00:00
#!/bin/sh -ex
2024-04-28 21:16:33 +00:00
2024-08-17 16:16:49 +00:00
[ -f .env ] && . ./.env
2024-05-19 11:42:29 +00:00
2024-05-02 15:10:52 +00:00
cat <<EOF > /kaniko/.docker/config.json
2024-04-28 21:16:33 +00:00
{
"auths": {
2024-05-02 15:10:52 +00:00
"$GITHUB_SERVER_URL": {
"username": "$INPUT_USERNAME",
"password": "$INPUT_PASSWORD"
2024-04-28 21:16:33 +00:00
}
}
}
EOF
2024-11-14 14:47:17 +00:00
[ -z "$IMAGEAPP" ] && IMAGEAPP="$${REGISTRY#*://}/$INPUT_IMAGE"
2024-05-19 11:42:29 +00:00
2024-05-02 15:10:52 +00:00
/kaniko/executor \
2024-10-09 00:33:34 +00:00
--cache="${INPUT_CACHE}" \
2024-05-02 15:10:52 +00:00
--context "${INPUT_DOCKERFILE%/*}" \
--dockerfile "$INPUT_DOCKERFILE" \
2024-05-19 11:42:29 +00:00
--destination "$IMAGEAPP"