fix actions
Some checks failed
Build NGINX on Ubuntu / build-and-push (push) Successful in 1m30s
Build NGINX on Ubuntu / deploy-to-kubernetes (push) Failing after 5m6s

This commit is contained in:
huangzhiqiang 2025-06-09 13:08:44 +08:00
parent 8e6f967173
commit c812228337
2 changed files with 2 additions and 3 deletions

View File

@ -192,8 +192,7 @@ jobs:
echo "kubectl 已存在,当前版本: $(kubectl version --client --short 2>/dev/null || kubectl version --client)" echo "kubectl 已存在,当前版本: $(kubectl version --client --short 2>/dev/null || kubectl version --client)"
else else
# 检查仓库中是否有 kubectl # 检查仓库中是否有 kubectl
ls -al k8s/kubectl if [ -f "k8s/kubectl" ]; then
if [ -f "k8s/kubectl" ] && [ -x "k8s/kubectl" ]; then
echo "使用仓库中的 kubectl..." echo "使用仓库中的 kubectl..."
sudo mv k8s/kubectl /usr/local/bin/ sudo mv k8s/kubectl /usr/local/bin/
sudo chmod +x /usr/local/bin/kubectl sudo chmod +x /usr/local/bin/kubectl

View File

@ -77,7 +77,7 @@ check_kubectl() {
fi fi
print_success "kubectl 连接正常" print_success "kubectl 连接正常"
kubectl cluster-info --short kubectl cluster-info
} }
# 创建命名空间(如果不存在) # 创建命名空间(如果不存在)