ci: do not fail release when oci chart push fails
Release Chart / release (push) Successful in 4s
deploy / build (push) Canceled after 3m32s

This commit is contained in:
2026-07-22 23:34:26 +03:30
parent 3935f5e2e8
commit e6054bc8ea
2 changed files with 11 additions and 34 deletions
+5 -17
View File
@@ -146,27 +146,15 @@ jobs:
if: steps.version.outputs.is_app_release == 'true'
run: |
set -euo pipefail
repo="oci://registry.kloude.ir/kloude/kks-provider-plugin-charts"
if ! echo "${{ secrets.REGISTRY_PASS }}" | helm registry login registry.kloude.ir \
if ! helm push --plain-http \
--username "${{ secrets.REGISTRY_USER }}" \
--password-stdin; then
echo "Registry login failed, retrying during push"
--password "${{ secrets.REGISTRY_PASS }}" \
"$CHART_PACKAGE" "$repo"; then
echo "OCI push failed (registry token realm/protocol issue). Continuing because chart artifact is already published to Gitea release assets."
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'
env: