Update createHelmYaml.sh
All checks were successful
Build docker container / Build image (push) Successful in 11s

This commit is contained in:
ties 2024-08-27 12:25:17 +00:00
parent 21ee42f85c
commit a012d272d0

View File

@ -48,12 +48,17 @@ if [[ -n "$KUBECONFIG_DATA" ]]; then
mkdir -p /home/notroot/.kube
echo "$KUBECONFIG_DATA" > /home/notroot/.kube/config
fi
# if actions is not set
if [[ -n "$action" ]]; then
action="print"
fi
echo "# action: $action"
# Check if the action environment variable is set to 'print'
if [[ "$action" == "print" ]]; then
createHelmYaml
elif [[ -n "$KUBECONFIG_DATA" ]]; then
elif [[ "$action" == "deploy" ]] && [[ -n "$KUBECONFIG_DATA" ]]; then
kubectl version --kubeconfig=/home/notroot/.kube/config
createHelmYaml | tee | kubectl apply -v -f -
else