Skip to content

Commit

Permalink
ci: Fix oras ArtifactHub config push (#5725)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored Feb 27, 2024
1 parent 9f70f6b commit 56c309b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hack/release/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 56c309b

Please sign in to comment.