Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/update-valkey-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ jobs:
- name: Get current redis-exporter version from values.yaml
id: current-exporter-version
run: |
# Extract tag from metrics section (more robust method)
CURRENT=$(awk '/^metrics:/,/^[a-z]+:/ {if (/^\s+tag:/) {print $2; exit}}' values.yaml | tr -d '"')
# Extract tag from metrics section.
# Note: avoid using the range pattern /^metrics:/,/^[a-z]+:/ because
# "metrics:" matches both the start and end pattern simultaneously in awk,
# causing the range to open and close on the same line (CURRENT always empty → infinite loop).
# Also, \s is not POSIX awk; use "^ +" instead.
CURRENT=$(awk '/^metrics:/{found=1; next} found && /^[a-z]/{exit} found && /^ +tag:/{gsub(/"/, "", $2); print $2; exit}' values.yaml)
echo "current_exporter_version=$CURRENT" >> $GITHUB_OUTPUT
echo "Current redis-exporter version: $CURRENT"

Expand Down