Repository navigation
ci: 视觉对比改用 src 模式避免环境变量干扰 - #36
Merged
Merged
Conversation
dist 模式经 @actions/core 的 INPUT_* 与生产 run() 生成,贡献数据依赖 fetch 拦截;作业环境里的 GITHUB_TOKEN 会让被测版本改走官方渠道,绕过拦截并拿到实时数据。src 模式直接用 calendarList 注入固定数据,不受环境影响。base 始终是最新 main,v3.3.3 起支持 calendarList,更早版本会由工具显式报错提示。
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.
问题
PR #35 的视觉对比在 head 侧生成失败。
dist模式通过@actions/core的INPUT_*和生产的run()生成 SVG,贡献数据依赖对gh-calendar请求的拦截注入;一旦作业环境带有GITHUB_TOKEN(mise-action 等会导出),新版实现会优先走官方 GraphQL 渠道,绕过拦截并拿到实时数据——轻则对比数据漂移,重则请求失败直接中断。变更
visual-compare.yml的比较步骤从--via dist改为--via srcsrc模式把calendarList直接透传给gensvg,不经过run()/INPUT_*,不受作业环境变量影响为什么安全
calendarList自 v3.3.3 引入,当前 main 已支持--via dist,不会误报视觉差异