Skip to content

Commit 11f822c

Browse files
authored
Quote NINJA_KUBECONFIG when writing kubeconfig (#213)
Unquoted `echo ${NINJA_KUBECONFIG}` word-splits the multi-line YAML on whitespace, collapsing newlines into spaces and producing an invalid kubeconfig (`yaml: mapping values are not allowed in this context`). Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent afb856a commit 11f822c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
if [ "$CLUSTER" = "prod" ]; then
8383
linode-cli lke kubeconfig-view 326609 --json | jq -r .[0].kubeconfig | base64 -d > ~/.kube/config
8484
else
85-
echo ${NINJA_KUBECONFIG} > ~/.kube/config
85+
echo "${NINJA_KUBECONFIG}" > ~/.kube/config
8686
fi
8787
kubectl get nodes
8888
echo "deploy docker image"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@ jobs:
9494
run: |
9595
echo "connect to cluster"
9696
mkdir -p ~/.kube
97-
echo ${NINJA_KUBECONFIG} > ~/.kube/config
97+
echo "${NINJA_KUBECONFIG}" > ~/.kube/config
9898
kubectl get nodes
9999
make deploy-to-linode

0 commit comments

Comments
 (0)