Skip to content

Commit c14db48

Browse files
authored
chore: fix release branch resolution (Mellanox#1262)
2 parents 694c8e9 + c501db2 commit c14db48

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
echo "RELEASE_VERSION=`echo $ISSUE_TITLE | awk '{ print $2 }'`" >> $GITHUB_ENV
1717
- name: Determine base branch
1818
run: |
19-
echo "BASE_BRANCH=${{ contains(env.RELEASE_VERSION, 'beta') && 'master' || env.RELEASE_VERSION }}" >> $GITHUB_ENV
19+
echo "BASE_BRANCH=$(echo $RELEASE_VERSION | grep -q 'beta' && echo 'master' || echo ${RELEASE_VERSION%%.*}.${RELEASE_VERSION#*.}.x)" >> $GITHUB_ENV
2020
- run: |
2121
git config user.name nvidia-ci-cd
2222
git config user.email [email protected]
@@ -53,13 +53,16 @@ jobs:
5353
path: sriov-network-operator-fork
5454
- run:
5555
echo "RELEASE_VERSION=`echo $ISSUE_TITLE | awk -F 'Release v' '{ print $2 }'`" >> $GITHUB_ENV
56+
- name: Determine sriov-network-operator branch
57+
run: |
58+
echo "BASE_BRANCH=$(echo network-operator-${RELEASE_VERSION%%.*}.${RELEASE_VERSION#*.}.x)" >> $GITHUB_ENV
5659
- name: Create tag to trigger PR that update image tags in network-operator values
5760
run: |
5861
cd sriov-network-operator-fork
5962
git config user.name nvidia-ci-cd
6063
git config user.email [email protected]
6164
62-
git checkout -b $RELEASE_VERSION origin/network-operator-$RELEASE_VERSION
65+
git checkout -b $RELEASE_VERSION origin/$BASE_BRANCH
6366
git tag $RELEASE_VERSION
6467
git push origin --tags
6568

0 commit comments

Comments
 (0)