From 2ada5298b24ca261601b515a7d0cd429dd9019fb Mon Sep 17 00:00:00 2001 From: Patrik Egyed Date: Tue, 24 Jan 2023 13:04:10 +0100 Subject: [PATCH] ci(GHA): fixed Helm version check Forced exact chart match. --- .github/workflows/helm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 77036004e..b451d79d6 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -102,7 +102,7 @@ jobs: printf >&2 "chart version mismatches, name: %s, expected version (from tag): %s, actual version (from chart): %s" "${{ steps.set-chart-name.outputs.chart_name }}" "${EXPECTED_CHART_VERSION}" "${ACTUAL_CHART_VERSION}" exit 1 fi - if helm search repo "${{ env.HELM_PUSH_REPOSITORY_NAME }}/${{ steps.set-chart-name.outputs.chart_name }}" --version "${ACTUAL_CHART_VERSION}" --output json | jq --exit-status 'length > 0'; then + if helm search repo --regexp "\v${{ env.HELM_PUSH_REPOSITORY_NAME }}/${{ steps.set-chart-name.outputs.chart_name }}\v" --devel --version "${ACTUAL_CHART_VERSION}" --output json | jq --exit-status 'length > 0'; then printf >&2 "chart version already exists in the repository, repository: %s, name: %s, version: %s" "${{ env.HELM_PUSH_REPOSITORY_NAME }}" "${{ steps.set-chart-name.outputs.chart_name }}" "${ACTUAL_CHART_VERSION}" exit 1 fi