Skip to content

Commit 3c0d190

Browse files
committed
fix(helm): push Artifact Hub metadata from helm/ so the layer title matches
Dry-ran the publish sequence against a local OCI registry, which surfaced one divergence from Artifact Hub's documented command: passing a path-qualified argument to oras records the layer's title annotation as `helm/artifacthub-repo.yml` rather than the bare `artifacthub-repo.yml` the docs produce. Artifact Hub selects the layer by media type, so this was probably harmless, but there is no reason to diverge from the documented form. Running the step from helm/ reproduces it exactly. Everything else in the sequence behaved as intended against a real registry: helm push derives charts/sim:1.9.1 from the chart name and version, the digest grep extracts it, the metadata lands with both documented media types under the artifacthub.io tag, the chart and metadata tags coexist without disturbing each other, and helm pull round-trips to an identical sha256. Also confirmed the overwrite hazard behind the fail-closed guard is real rather than theoretical: re-pushing modified content under an existing version moved the tag, so a pinned consumer would have silently received different bytes.
1 parent 163c917 commit 3c0d190

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/helm.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,15 @@ jobs:
344344
- name: Publish Artifact Hub metadata
345345
env:
346346
REPOSITORY: ${{ steps.package.outputs.repository }}
347+
# Run from `helm/` so the layer's title annotation is the bare
348+
# `artifacthub-repo.yml`, matching Artifact Hub's documented command. A
349+
# path-qualified argument records `helm/artifacthub-repo.yml` instead.
350+
working-directory: helm
347351
run: |
348352
set -euo pipefail
349353
oras push "${REPOSITORY}:artifacthub.io" \
350354
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
351-
helm/artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
355+
artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
352356
353357
- name: Summary
354358
env:

0 commit comments

Comments
 (0)