Skip to content

Commit 37b38fc

Browse files
committed
corrected workflow to extract the correct branch name
Signed-off-by: swastik959 <swastik.gour@suse.com>
1 parent 5842ec1 commit 37b38fc

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,14 @@ jobs:
166166
env:
167167
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
168168
run: |
169+
CURRENT_BRANCH="${{ github.ref_name }}"
170+
BASE_VERSION=$(echo "$CURRENT_BRANCH" | sed -E 's/^[^v]*(v[0-9]+\.[0-9]+).*/\1/')
171+
TRANSFORMED_VERSION="${BASE_VERSION/v1./v2.}"
172+
TARGET_BRANCH="dev-${TRANSFORMED_VERSION}"
169173
VERSION_OVERRIDE="minor"
170174
gh workflow run "Manual Trigger for Auto Bump" \
171175
--repo rancher/charts \
172-
--ref dev-v2.12 \
176+
--ref "$TARGET_BRANCH" \
173177
-F chart=rancher-gke-operator \
174-
-F branch=dev-v2.12 \
178+
-F branch="$TARGET_BRANCH" \
175179
-F version-override=$VERSION_OVERRIDE

0 commit comments

Comments
 (0)