fix(ci): publish needs contents: read to check out the repo - #16
Merged
Conversation
Naming any permission on a job REPLACES the default set, so id-token: write on
its own left the job without contents: read. actions/checkout then failed with
remote: Repository not found.
fatal: repository 'https://github.com/khwanlabs/khwan-mcp/' not found
which reads like the repository is gone rather than like a missing scope, and
only happens on a private one — a public repo checks out without it, which is why
this passed on the first package and failed on the next.
Fixed in all three so the same release does not have to be diagnosed twice.
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.
id-token: writeon its own left the publish job withoutcontents: read. Naming any permission on a job replaces the default set — soactions/checkouthad no read scope and failed:Which reads like the repository is gone rather than like a missing scope.
It only bites on a private repo — a public one checks out without the permission. That is why the first package published fine this way and the next did not, and why it is fixed in all three rather than only where it broke.
Caught by the v0.3.2 release of khwan-mcp, which failed at checkout before it ever reached PyPI. Nothing was published, so the tag can simply be re-released once this is in.