From 8d6b57b5f9df6b0fd5d345e02e0641e059a8a3fd Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 29 May 2025 11:43:04 +0200 Subject: [PATCH] fix: move cd - command after git operations in patch workflow Move the directory restoration command after the git operations to ensure all git commands execute in the correct working directory before returning to the previous directory. Signed-off-by: rjshrjndrn --- .github/workflows/patch-build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/patch-build.yaml b/.github/workflows/patch-build.yaml index 2fd89476a..ded962872 100644 --- a/.github/workflows/patch-build.yaml +++ b/.github/workflows/patch-build.yaml @@ -157,12 +157,13 @@ jobs: local version=$2 local chart_path="$WORKING_DIR/scripts/helmcharts/openreplay/charts/$service/Chart.yaml" + # Ensure we're in the original working directory/repository cd "$WORKING_DIR" yq eval ".AppVersion = \"$version\"" -i "$chart_path" - cd - git add "$chart_path" git commit -m "Increment $service chart version to $version" git push --set-upstream origin "$BRANCH_NAME" + cd - } # Main execution