No bash or arrays in busybox sh
This commit is contained in:
parent
2138c52c9c
commit
d4bbe84196
1 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
# Setup auth
|
||||
echo '{"auths":{"'"$(printf "%s" "$INPUT_REGISTRY")"'":{"auth":"'"$(printf "%s" "$INPUT_CREDENTIAL" | base64 | tr -d '\n')"'"}}}' > /kaniko/.docker/config.json
|
||||
|
@ -8,11 +8,11 @@ if [ -n "$INPUT_WORKDIR" ]; then
|
|||
printf 'cd %s -> %s\n' "$OLDPWD" "$PWD"
|
||||
fi
|
||||
|
||||
options=()
|
||||
context_flag=""
|
||||
if [ -n "$INPUT_CONTEXT" ]; then
|
||||
options+=('--context')
|
||||
options+=("$INPUT_CONTEXT")
|
||||
context_flag="--context"
|
||||
context_flag_val="$INPUT_CONTEXT"
|
||||
fi
|
||||
|
||||
# Build container
|
||||
/kaniko/executor --dockerfile "$INPUT_DOCKERFILE" --destination "$INPUT_REGISTRY/$INPUT_IMAGE" "${options[@]}"
|
||||
/kaniko/executor --dockerfile "$INPUT_DOCKERFILE" --destination "$INPUT_REGISTRY/$INPUT_IMAGE" "$context_flag" "$context_flag_val"
|
||||
|
|
Loading…
Add table
Reference in a new issue