diff --git a/.github/workflows/notebook-controller-images-updater.yaml b/.github/workflows/notebook-controller-images-updater.yaml index e033270cc42..3811956a764 100644 --- a/.github/workflows/notebook-controller-images-updater.yaml +++ b/.github/workflows/notebook-controller-images-updater.yaml @@ -52,7 +52,7 @@ jobs: - name: Extract version from branch-name id: version run: | - if VERSION=$(echo "${{ env.BRANCH_NAME }}" | sed -E 's/^v([0-9]+\.[0-9]+)-.*/\1/') then + if [[ "${{ env.BRANCH_NAME }}" == "main" ]]; then VERSION="main" else VERSION=$(echo "${{ env.BRANCH_NAME }}" | sed -E 's/^v([0-9]+\.[0-9]+)-.*/\1/') @@ -65,15 +65,6 @@ jobs: echo "VERSION=$VERSION" >> ${GITHUB_OUTPUT} echo "Extracted VERSION is: $VERSION" - - if [[ "${{ env.BRANCH_NAME }}" == "main" ]]; then - VERSION="main" - else - VERSION=$(echo "${{ env.BRANCH_NAME }}" | sed -E 's/^v([0-9]+\.[0-9]+)-.*/\1/') - fi - echo "VERSION=$VERSION" >> ${GITHUB_OUTPUT} - echo "Extracted VERSION is: $VERSION" - - name: Update related files id: apply-changes run: |