Skip to content

Commit 1f5959f

Browse files
committed
fix(ci): authenticate docker so cosign can sign the published chart (#253)
`helm registry login` writes to helm's own config (~/.config/helm/registry/config.json), which cosign doesn't read. After `helm push` succeeds, the subsequent `cosign sign` against the just-published OCI subject fails with `UNAUTHORIZED: unauthenticated` because cosign reads ~/.docker/config.json instead. Add a docker/login-action step alongside the helm registry login (same pattern operator-ci.yaml uses for signing operator images) so cosign can upload the .sig layer and the cyclonedx SBOM attestation to the same ghcr.io repository. Surfaced when publishing chart/v0.16.0 once the prior `helm push` stderr parsing fix (PR #249) let the workflow reach the cosign step. Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>
1 parent 507fa5e commit 1f5959f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@ jobs:
172172
echo "${{ secrets.GITHUB_TOKEN }}" \
173173
| helm registry login ghcr.io --username "${{ github.actor }}" --password-stdin
174174
175+
# cosign reads ~/.docker/config.json; helm registry login writes its own
176+
# config so cosign can't see those creds. Authenticate docker too so the
177+
# downstream sign/attest steps can upload the .sig and SBOM layers.
178+
- name: Log in to ghcr.io (docker, for cosign)
179+
uses: docker/login-action@v4
180+
with:
181+
registry: ghcr.io
182+
username: ${{ github.actor }}
183+
password: ${{ secrets.GITHUB_TOKEN }}
184+
175185
- name: Push chart to ghcr.io
176186
id: push-chart
177187
env:

0 commit comments

Comments
 (0)