Error: unknown command "chart" for "helm" on github actions

Error: unknown command "chart" for "helm" on github actions

我在 helm/kubernetes 的 github 操作中的 CI 部署开始失败并出现以下错误:

Error: unknown command "chart" for "helm" on github actions

在我的 CI.yaml 文件中,我有以下 helm 命令:


echo *****************
echo SAVING HELM CHART
echo *****************
# log in to aws and push the helm chart
aws ecr get-login-password --region us-west-2 | helm registry login --username AWS --password-stdin XXXX.amazonaws.com
helm chart save ./server-helm-chart/ XXXXX.amazonaws.com/test/helm:$helmChartVersion
echo *****************
echo PUSHING HELM CHART
echo *****************
helm chart push XXXX.amazonaws.com/test/helm:$helmChartVersion

Helm 删除了 chart 函数,因此它们现在被 pushpackage 取代。

此处列出了这些更改: https://github.com/helm/helm/releases/tag/v3.7.0

所以我需要重命名我的 Chart.yaml 以匹配 AWS 注册表名称,然后我的代码变成:

echo *****************
echo SAVING HELM CHART
echo *****************
# log in to aws and push the helm chart
# aws ecr get-login-password --region us-west-2 | helm registry login --username AWS --password-stdin XXXX.amazonaws.com
# export CHART_FILE=`helm package ./server-helm-chart/ | awk -F'[:]' '{gsub(/ /, "", ); print }'`
echo *****************
echo PUSHING HELM CHART
echo *****************
# helm push $CHART_FILE oci://XXXX.dkr.ecr.us-west-2.amazonaws.com/staging/helm:$helmChartVersion