ci: add resilient helm oci push fallbacks
Release Chart / release (push) Failing after 30s
deploy / build (push) Canceled after 1m30s

This commit is contained in:
2026-07-22 23:32:49 +03:30
parent 1a5d6c8b37
commit 3935f5e2e8
2 changed files with 42 additions and 7 deletions
+20 -3
View File
@@ -145,10 +145,27 @@ jobs:
- name: Push chart to OCI registry
if: steps.version.outputs.is_app_release == 'true'
run: |
helm push --plain-http \
set -euo pipefail
if ! echo "${{ secrets.REGISTRY_PASS }}" | helm registry login registry.kloude.ir \
--username "${{ secrets.REGISTRY_USER }}" \
--password "${{ secrets.REGISTRY_PASS }}" \
"$CHART_PACKAGE" "oci://registry.kloude.ir/kloude/kks-provider-plugin-charts"
--password-stdin; then
echo "Registry login failed, retrying during push"
fi
primary_repo="oci://registry.kloude.ir/kloude/kks-provider-plugin-charts"
fallback_repo="oci://registry.kloude.ir/kloude"
if helm push --username "${{ secrets.REGISTRY_USER }}" --password "${{ secrets.REGISTRY_PASS }}" "$CHART_PACKAGE" "$primary_repo"; then
exit 0
fi
if helm push --plain-http --username "${{ secrets.REGISTRY_USER }}" --password "${{ secrets.REGISTRY_PASS }}" "$CHART_PACKAGE" "$primary_repo"; then
exit 0
fi
if helm push --username "${{ secrets.REGISTRY_USER }}" --password "${{ secrets.REGISTRY_PASS }}" "$CHART_PACKAGE" "$fallback_repo"; then
exit 0
fi
helm push --plain-http --username "${{ secrets.REGISTRY_USER }}" --password "${{ secrets.REGISTRY_PASS }}" "$CHART_PACKAGE" "$fallback_repo"
- name: Make OCI chart public
if: steps.version.outputs.is_app_release == 'true'