添加安装gettext
Some checks failed
CI/CD Pipeline for mengning.com.cn / build (push) Failing after 2m40s
Some checks failed
CI/CD Pipeline for mengning.com.cn / build (push) Failing after 2m40s
This commit is contained in:
@@ -49,15 +49,21 @@ jobs:
|
||||
TLS_CERTIFICATE: ${{ secrets.TLS_CERTIFICATE }}
|
||||
TLS_PRIVATE_KEY: ${{ secrets.TLS_PRIVATE_KEY }}
|
||||
run: |
|
||||
# 安装 kubectl
|
||||
curl -LO https://mirrors.ustc.edu.cn/kubernetes/core%3A/stable%3A/v1.28/deb/amd64/kubectl_1.28.0-1.1_amd64.deb
|
||||
sudo dpkg -i kubectl_1.28.0-1.1_amd64.deb
|
||||
|
||||
# 安装 envsubst(gettext)
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gettext
|
||||
|
||||
# 配置 kubectl
|
||||
kubectl config set-cluster remote-cluster --server=${{ secrets.K8S_URL }} --insecure-skip-tls-verify=true
|
||||
kubectl config set-credentials token-user --token=${{ secrets.K8S_TOKEN }}
|
||||
kubectl config set-context remote-context --cluster=remote-cluster --user=token-user
|
||||
kubectl config use-context remote-context
|
||||
|
||||
# 使用 envsubst 替换所有变量(包括多行的证书和私钥)
|
||||
# 注意:需要安装 gettext 包(通常已包含 envsubst)
|
||||
# 使用 envsubst 替换所有变量(包括多行证书和私钥)
|
||||
export TLS_CERTIFICATE
|
||||
export TLS_PRIVATE_KEY
|
||||
export DOCKER_REGISTRY_ADDRESS
|
||||
|
||||
Reference in New Issue
Block a user