fix(ci): authenticate Helm to Docker Hub

Restore the explicit Helm registry login to address unauthorized chart pushes, and log out after publishing.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
volker.raschekandCopilot committed 2026-12-04 20:13:24 +01:00
1 parent ea95db78e4
commit 721e17bdb8
1 file changed
+9
+9
View File
@@ -196,10 +196,19 @@ jobs:
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSPHRASE }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_KEY }}
DOCKER_CHARTS_PASSWORD: ${{ secrets.DOCKER_CHARTS_PASSWORD }}
DOCKER_CHARTS_USERNAME: ${{ secrets.DOCKER_CHARTS_USERNAME }}
run: |
# Helm is not able to reuse the login credentials of the docker-login action. The docker-login action can also
# not removed, because cosign requires the docker auth.json for uploading the signature. For this reason, we
# need to login manually.
printf '%s' "${DOCKER_CHARTS_PASSWORD}" | helm registry login -u "${DOCKER_CHARTS_USERNAME}" registry-1.docker.io --password-stdin
helm push gitea/${PACKAGE_NAME}-${PACKAGE_VERSION}.tgz oci://registry-1.docker.io/giteacharts
cosign sign --yes --upload=true --key=env://COSIGN_PRIVATE_KEY registry-1.docker.io/giteacharts/${PACKAGE_NAME}:${PACKAGE_VERSION}
helm registry logout registry-1.docker.io
- name: Upload Chart to Cloudflare R2 (Helm)
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }}