fix: grant workflows:write so upstream-sync can push workflow-file changes - #55
Merged
Merged
Conversation
…anges Every scheduled run has failed since upstream added integration_tests.yml: GitHub blocks GITHUB_TOKEN from pushing any commit touching .github/workflows/* unless workflows:write is explicitly granted, and this workflow only had contents:write and pull-requests:write.
Merged
2 tasks
solderzzc
added a commit
that referenced
this pull request
Aug 16, 2026
…ion key doesn't exist (#58) The previous fix (merged as #55) added workflows: write to this file's permissions: block on the mistaken assumption that it's a grantable GITHUB_TOKEN scope, mirroring the wording of the push-rejection error message. It isn't — there is no such permissions key at all, and GitHub's schema validator now rejects this file outright (confirmed via a failed workflow_dispatch: "Unexpected value 'workflows'"), which is strictly worse than the original bug. GITHUB_TOKEN can never push a commit touching .github/workflows/*, full stop — that restriction isn't scoped by permissions: and can't be granted to the default token. mlx-swift's sibling upstream-sync.yml already works around this correctly: restore .github/workflows from origin/main after merging upstream, so the push never actually touches workflow files. This applies the same pattern here. Co-authored-by: Aegis AI Assistant <simba@aegis-ai.dev>
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
upstream-sync.ymlhas failed on every scheduled run since upstream (ml-explore/mlx-swift-lm) addedintegration_tests.yml..github/workflows/*requires theworkflows: writepermission scope, which this workflow didn't grant (onlycontents: writeandpull-requests: write).Fix
Add
workflows: writeto the job'spermissions:block. No credential changes needed — the defaultGITHUB_TOKENalready supports this scope, it just wasn't declared.Test plan
workflow_dispatchmanually and confirm the sync branch pushes successfully and a PR opens.