From 4ae80027571201e915e0a3306da7ccf85ac39ab0 Mon Sep 17 00:00:00 2001 From: Dmitry Anoshin Date: Fri, 21 Feb 2025 13:42:58 -0800 Subject: [PATCH] use yq instead of grep --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index de50b7928..578235ed8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,8 +17,8 @@ jobs: - name: Check if the release is needed id: check_update_chart run: | - LATEST_VERSION=$(curl -s https://api.github.com/repos/signalfx/splunk-otel-collector-chart/releases/latest | grep tag_name | cut -d - -f 4 | cut -d \" -f 1) - CURRENT_VERSION=$(cat helm-charts/splunk-otel-collector/Chart.yaml | grep -E "^version:" | cut -d " " -f 2) + LATEST_VERSION=$(curl -s https://signalfx.github.io/splunk-otel-collector-chart/index.yaml | yq e '.entries["splunk-otel-collector"][0].version') + CURRENT_VERSION=$(yq e '.version' helm-charts/splunk-otel-collector/Chart.yaml) if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then echo "New release needed, creating..." echo "NEED_RELEASE=1" >> $GITHUB_OUTPUT