feat: export K8S_NS
This commit is contained in:
parent
6bf1ef88a2
commit
84ec9cf196
@ -6,12 +6,12 @@ set -a
|
|||||||
set +a
|
set +a
|
||||||
|
|
||||||
REGISTRY="${IMAGEAPP%%/*}"
|
REGISTRY="${IMAGEAPP%%/*}"
|
||||||
NS="${GITHUB_REPOSITORY#*/}-${GITHUB_REF_NAME}"
|
export K8S_NS="${GITHUB_REPOSITORY#*/}-${GITHUB_REF_NAME}"
|
||||||
|
|
||||||
mkdir -p "$HOME/.kube/"
|
mkdir -p "$HOME/.kube/"
|
||||||
echo "$INPUT_KUBECONFIG" > "$HOME/.kube/config"
|
echo "$INPUT_KUBECONFIG" > "$HOME/.kube/config"
|
||||||
kubectl get namespace "$NS" || kubectl create namespace "$NS"
|
kubectl get namespace "$K8S_NS" || kubectl create namespace "$K8S_NS"
|
||||||
kubectl config set-context --current --namespace="$NS"
|
kubectl config set-context --current --namespace="$K8S_NS"
|
||||||
|
|
||||||
if [ -n "$INPUT_REGISTRY_PASSWORD" ]; then
|
if [ -n "$INPUT_REGISTRY_PASSWORD" ]; then
|
||||||
kubectl get secret regcred \
|
kubectl get secret regcred \
|
||||||
|
Loading…
Reference in New Issue
Block a user