File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,18 @@ jobs:
109109 registry : ${{ env.REGISTRY }}
110110 username : ${{ secrets.NVCR_USERNAME }}
111111 password : ${{ secrets.NVCR_TOKEN }}
112- - name : Determine version and tag
112+ - name : Determine version, tag, and base branch
113113 run : |
114114 git_tag=${{ github.ref_name }}
115115 echo VERSION_WITH_PREFIX=$git_tag >> $GITHUB_ENV
116116 echo VERSION_WITHOUT_PREFIX=${git_tag:1} >> $GITHUB_ENV # without the 'v' prefix
117+ if echo $git_tag | grep beta; then
118+ base_branch=$DEFAULT_BRANCH
119+ else
120+ v_major_minor=$(echo $git_tag | grep -Eo '^v[0-9]+\.[0-9]+')
121+ base_branch=$v_major_minor.x
122+ fi
123+ echo BASE_BRANCH=$base_branch >> $GITHUB_ENV
117124 - name : Lookup image digest
118125 run : |
119126 network_operator_digest=$(skopeo inspect docker://$REGISTRY/$IMAGE_NAME:$VERSION_WITH_PREFIX | jq -r .Digest)
@@ -145,7 +152,7 @@ jobs:
145152 git push -u origin $FEATURE_BRANCH
146153 gh pr create \
147154 --head $FEATURE_BRANCH \
148- --base $DEFAULT_BRANCH \
155+ --base $BASE_BRANCH \
149156 --title "task: update bundle to $VERSION_WITH_PREFIX" \
150157 --body "Created by the *${{ github.job }}* job in [${{ github.repository }} OCP bundle CI](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
151158 - name : Determine if to send bundle to RedHat
You can’t perform that action at this time.
0 commit comments