mirror of
https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
synced 2025-10-27 23:08:55 +08:00
Merge branch 'feature/11-http-add-the-http-module' into 'main'
fixci:优化自动打标签流程 See merge request gewuyou/forgeboot!17
This commit is contained in:
commit
d71262b550
@ -13,14 +13,21 @@ before_script:
|
|||||||
# 🏷️ 自动打标签
|
# 🏷️ 自动打标签
|
||||||
tag:
|
tag:
|
||||||
stage: tag
|
stage: tag
|
||||||
image: alpine:latest
|
image:
|
||||||
|
name: alpine/git:latest
|
||||||
|
entrypoint: [ "" ]
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_MESSAGE !~ /ci/i'
|
- if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_MESSAGE !~ /ci/i'
|
||||||
script:
|
script:
|
||||||
- set -euo pipefail
|
|
||||||
- apk add --no-cache git
|
|
||||||
- git config --global user.email "pipeline@${GITLAB_URL}"
|
- git config --global user.email "pipeline@${GITLAB_URL}"
|
||||||
- git config --global user.name "Project Pipeline Bot"
|
- git config --global user.name "Project Pipeline Bot"
|
||||||
|
- echo "🧹 删除所有本地 tag..."
|
||||||
|
- git tag -l | xargs -r git tag -d || true
|
||||||
|
- echo "🔍 拉取远程 tag 和 main"
|
||||||
|
- git fetch --tags --force --prune
|
||||||
|
- git fetch origin main --force
|
||||||
|
- MAIN_COMMIT=$(git rev-parse origin/main)
|
||||||
|
- echo "🔗 当前 main commit -> $MAIN_COMMIT"
|
||||||
- git fetch --tags
|
- git fetch --tags
|
||||||
- git fetch origin main
|
- git fetch origin main
|
||||||
- MAIN_COMMIT=$(git rev-parse origin/main)
|
- MAIN_COMMIT=$(git rev-parse origin/main)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user