File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,13 +52,26 @@ jobs:
5252 needs : [ build_pyc ]
5353 runs-on : ubuntu-latest
5454 steps :
55+ - name : Determine Target Branch
56+ id : extract_branch
57+ run : |
58+ if [[ "${{ github.ref_type }}" == "tag" && "${{ github.ref_name }}" == build.* ]]; then
59+ VERSION="${{ github.ref_name }}"
60+ VERSION="${VERSION#build.}"
61+ TARGET_BRANCH="feat/${VERSION}"
62+ else
63+ TARGET_BRANCH="feat/2.4.0"
64+ fi
65+ echo "target_branch=$TARGET_BRANCH" >> $GITHUB_OUTPUT
66+ echo "Determined target branch: $TARGET_BRANCH"
67+
5568 - name : Checkout SSO Project
5669 uses : actions/checkout@v4
5770 with :
5871 repository : dataelement/bisheng
5972 token : ${{ secrets.CROSS_REPO_TOKEN }}
6073 # 使用 ref 指定分支,而不是 base
61- ref : feat/2.3.0
74+ ref : ${{ steps.extract_branch.outputs.target_branch }}
6275 path : bisheng
6376 # 确保拉取完整的历史以便正确提交
6477 fetch-depth : 0
93106 echo "No changes to commit"
94107 else
95108 git commit -m "chore: update telemetry_search build artifacts [skip ci]"
96- git push origin feat/2.3.0
109+ git push origin ${{ steps.extract_branch.outputs.target_branch }}
97110 fi
You can’t perform that action at this time.
0 commit comments