diff --git a/k8sdeploy.sh b/k8sdeploy.sh index fc27005..2f7a3d6 100755 --- a/k8sdeploy.sh +++ b/k8sdeploy.sh @@ -6,12 +6,12 @@ set -a set +a REGISTRY="${IMAGEAPP%%/*}" -NS="${GITHUB_REPOSITORY#*/}-${GITHUB_REF_NAME}" +export K8S_NS="${GITHUB_REPOSITORY#*/}-${GITHUB_REF_NAME}" mkdir -p "$HOME/.kube/" echo "$INPUT_KUBECONFIG" > "$HOME/.kube/config" -kubectl get namespace "$NS" || kubectl create namespace "$NS" -kubectl config set-context --current --namespace="$NS" +kubectl get namespace "$K8S_NS" || kubectl create namespace "$K8S_NS" +kubectl config set-context --current --namespace="$K8S_NS" if [ -n "$INPUT_REGISTRY_PASSWORD" ]; then kubectl get secret regcred \