From 84ec9cf196e6b3b0686d0a4f506d9bcfe9bdc5e1 Mon Sep 17 00:00:00 2001 From: ange Date: Wed, 15 May 2024 19:41:54 +0200 Subject: [PATCH] feat: export K8S_NS --- k8sdeploy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 \