From 860ab947e46d0fe8a75de6c4637ef4bfa5190b00 Mon Sep 17 00:00:00 2001 From: ange Date: Fri, 29 Nov 2024 04:46:13 +0000 Subject: [PATCH] fix: invalid namespace name --- action.yaml | 2 +- k8sdeploy.sh => entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename k8sdeploy.sh => entrypoint.sh (85%) diff --git a/action.yaml b/action.yaml index 0fe3cdb..763ad98 100644 --- a/action.yaml +++ b/action.yaml @@ -12,4 +12,4 @@ runs: using: composite steps: - name: k8sdeploy - run: ${{ gitea.action_path }}/k8sdeploy.sh + run: ${{ gitea.action_path }}/entrypoint.sh diff --git a/k8sdeploy.sh b/entrypoint.sh similarity index 85% rename from k8sdeploy.sh rename to entrypoint.sh index 2f7a3d6..f04b921 100755 --- a/k8sdeploy.sh +++ b/entrypoint.sh @@ -6,7 +6,7 @@ set -a set +a REGISTRY="${IMAGEAPP%%/*}" -export K8S_NS="${GITHUB_REPOSITORY#*/}-${GITHUB_REF_NAME}" +export K8S_NS; K8S_NS="$(tr '[:upper:]' '[:lower:]' <<< "${GITHUB_REPOSITORY#*/}-$GITHUB_REF_NAME" | tr -c '[:lower:]-' -)" mkdir -p "$HOME/.kube/" echo "$INPUT_KUBECONFIG" > "$HOME/.kube/config"