fix(qr-login): 扫码登录完成后一并清理 Release 与 Tag - #33
Open
xfxx2022 wants to merge 2 commits into
Open
Conversation
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.
背景
二维码登录工作流在「发布二维码图片直链」步骤创建
qr-<run_id>的 GitHub Release 及其同名 Git Tag。登录完成后虽有清理步骤,但gh release delete默认不会删除底层 Git Tag,导致每次运行都会残留一个qr-*标签长期堆积。改动
在
.github/workflows/二维码登录.yml的两处清理步骤的gh release delete命令追加--cleanup-tag参数:清理本次二维码 Release 及 Tag:删除本次运行的 Release 及同名 Tag。清理旧的二维码 Release 及 Tag:删除旧 Release 时一并清理其 Tag。两步均
continue-on-error+2>/dev/null兜底,单条 Tag 删除失败不影响整体流程。影响与风险
qr-*标签堆积,仓库 Tags 列表保持干净。--cleanup-tag仅删除由本工作流创建的qr-*轻量标签,不触碰业务分支、保护分支或版本 Tag。ghstable 已支持--cleanup-tag。验证
qr-<本次run_id>的 Release 和 Tag 均应在工作流结束后消失。