mirror of
https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
synced 2025-10-27 13:14:23 +08:00
ci:优化代码仓库克隆和测试流程
- 移除 git clone 命令中的 --depth=1 参数,保留完整历史记录 - 为 gradlew 添加执行权限,确保测试流程顺利进行
This commit is contained in:
parent
5306ffe645
commit
210aad575b
@ -101,7 +101,7 @@ reset:
|
||||
- apk add --no-cache git
|
||||
- git config --global user.email "pipeline@${GITLAB_URL}"
|
||||
- git config --global user.name "Project Pipeline Bot"
|
||||
- git clone --depth=1 --branch main https://oauth2:${PIPELINE_BOT_TOKEN}@${GITLAB_URL}/${CI_PROJECT_PATH}.git repo
|
||||
- git clone --branch main https://oauth2:${PIPELINE_BOT_TOKEN}@${GITLAB_URL}/${CI_PROJECT_PATH}.git repo
|
||||
- cd repo
|
||||
- git checkout -B test
|
||||
- git push origin test --force
|
||||
|
||||
@ -8,6 +8,8 @@ build:
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "test"'
|
||||
script:
|
||||
- echo "🔧 授予 gradlew 执行权限..."
|
||||
- chmod +x gradlew
|
||||
- ./gradlew clean build
|
||||
tags:
|
||||
- java
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user