feat: source .env if exists
This commit is contained in:
parent
17b82e6a91
commit
61b0a93920
10
build.sh
10
build.sh
@ -1,5 +1,7 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
. ./.env || true
|
||||
|
||||
cat <<EOF > /kaniko/.docker/config.json
|
||||
{
|
||||
"auths": {
|
||||
@ -11,9 +13,13 @@ cat <<EOF > /kaniko/.docker/config.json
|
||||
}
|
||||
EOF
|
||||
|
||||
REGISTRY="$(echo "$GITHUB_SERVER_URL" | sed 's .*:// ')"
|
||||
if [ -z "$IMAGEAPP" ]; then
|
||||
REGISTRY="$(echo "$GITHUB_SERVER_URL" | sed 's .*:// ')"
|
||||
IMAGEAPP="$REGISTRY/$INPUT_IMAGE"
|
||||
fi
|
||||
|
||||
/kaniko/executor \
|
||||
--cache=true \
|
||||
--context "${INPUT_DOCKERFILE%/*}" \
|
||||
--dockerfile "$INPUT_DOCKERFILE" \
|
||||
--destination "$REGISTRY/$INPUT_IMAGE"
|
||||
--destination "$IMAGEAPP"
|
||||
|
Loading…
Reference in New Issue
Block a user