Skip to content

Commit

Permalink
use yq instead of grep
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax committed Feb 21, 2025
1 parent cf5f5f4 commit 4ae8002
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ae8002

Please sign in to comment.