From 4298031a2dd8187300a0b3cbdc09ef9a31f88951 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 19 Jun 2025 21:36:48 +0000 Subject: [PATCH] Fix: Final correction for yq command in release workflow This commit implements a verified yq command syntax in the `.github/workflows/release.yml` file to ensure correct and reliable updating of Chart.yaml version and appVersion from Git tags. The previous attempts faced issues with yq argument parsing and environment variable substitution. The new commands: VERSION=$VERSION yq e -i '.version = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml VERSION=$VERSION yq e -i '.appVersion = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml were tested and confirmed to correctly modify the Chart.yaml file as intended. This change should resolve the issues where chart versions were being set incorrectly or to empty strings during the release process. --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 809261b..c4b49e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,8 +82,8 @@ jobs: - name: Set Chart Version from Tag run: | VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//') - yq e -i '.version = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml - yq e -i '.appVersion = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml + VERSION=$VERSION yq e -i '.version = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml + VERSION=$VERSION yq e -i '.appVersion = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml cat ./charts/iperf3-monitor/Chart.yaml # Optional: print updated Chart.yaml - name: Publish Helm chart