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"