fix(ci): 修复 create-tag job 中 TAG_CREATED 判断逻辑错误#303
Merged
Conversation
在创建 tag 之前新增 check_tag 步骤预先检查 tag 是否已存在, Step 4 改为引用 check_tag 输出判断 TAG_CREATED, 移除不再使用的 IS_MASTER 和 NEEDS_INCREMENT 变量。 Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
create-tagjob 的 Step 4 在 Step 3 创建 tag 之后才用git rev-parse检查 tag 是否存在来决定TAG_CREATED的值。由于 tag 刚被创建,git rev-parse必然成功,导致除了Master + NEEDS_INCREMENT=true这条硬编码路径外,其余路径的TAG_CREATED始终为false,使得下游releasejob 被错误跳过。修复方式
check_tag步骤,预先检查 tag 是否已存在并输出tag_existscheck_tag的输出来判断TAG_CREATED,确保所有路径的判断都正确IS_MASTER和NEEDS_INCREMENT变量测试计划
TAG_CREATED输出为trueTAG_CREATED输出为trueTAG_CREATED输出为false,releasejob 被正确跳过Made with Cursor