fix: allow staging reusable workflow checkout / 允许预发布可复用工作流检出代码#566
Merged
Conversation
Grant the reusable ingest job contents read permission so the called workflow can check out the app repository without exceeding the caller permission ceiling. 中文:允许预发布可复用工作流检出代码。为可复用写入任务授予 contents 读取权限,使被调用工作流能够检出应用仓库,同时不超出调用方的权限上限。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Root cause
The top-level staging workflow defaulted all GITHUB_TOKEN permissions to none. Its reusable ingest workflow requests contents read for checkout, but reusable workflows cannot elevate permissions beyond their caller. GitHub therefore rejected the workflow graph with startup_failure.
Validation
中文说明
根因是顶层预发布工作流将 GITHUB_TOKEN 权限默认为 none,而可复用写入工作流需要 contents 读取权限来检出代码。可复用工作流不能超出调用方的权限上限,因此 GitHub 在构建工作流任务图时直接拒绝启动。
Note
Low Risk
CI-only permission wiring with no application, auth, or data-path changes.
Overview
The staging workflow sets
permissions: {}at the top level, so jobs start with noGITHUB_TOKENscopes. Theingestjob invokes reusableingest-agentic-results.yml, whose ingest job needscontents: readforactions/checkout. Reusable workflows cannot exceed the caller’s permissions, so GitHub rejected the workflow graph withstartup_failurebefore any staging job ran.This change adds
permissions: contents: readon theingestjob instage-results.yml, matching what the called workflow already requests and unblockingrepository_dispatchstaging runs.Reviewed by Cursor Bugbot for commit 13f6de3. Bugbot is set up for automated code reviews on this repo. Configure here.