diff --git a/hack/release/common.sh b/hack/release/common.sh index b266dace967f..6f8f5346bacf 100644 --- a/hack/release/common.sh +++ b/hack/release/common.sh @@ -91,7 +91,14 @@ publishHelmChart() { yq e -i ".version = \"${version}\"" "charts/${helm_chart}/Chart.yaml" cd charts - [[ -s "${ah_config_file_name}" ]] && oras push "${oci_repo}/${helm_chart}:artifacthub.io" --config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml "${ah_config_file_name}:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml" + if [[ -s "${ah_config_file_name}" ]]; then + # ECR requires us to create an empty config file for an alternative + # media type artifact push rather than /dev/null + # https://github.com/aws/containers-roadmap/issues/1074 + temp=$(mktemp) + echo {} > "${temp}" + oras push "${oci_repo}/${helm_chart}:artifacthub.io" --config "${temp}:application/vnd.cncf.artifacthub.config.v1+yaml" "${ah_config_file_name}:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml" + fi helm dependency update "${helm_chart}" helm lint "${helm_chart}" helm package "${helm_chart}" --version "${version}"