Skip to content

Commit 823b7c6

Browse files
committed
ci: change github workflow
1 parent 309779e commit 823b7c6

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/build_linux_only.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff 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
@@ -93,5 +106,5 @@ jobs:
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

0 commit comments

Comments
 (0)