Grant actions: write to publish job so push_gem dispatch works - #2708
Merged
Conversation
The publish job runs `gh workflow run push_gem.yml` at the end of script/publish to kick off the gem push, but that dispatch was failing with HTTP 403 "Resource not accessible by integration" because the job's GITHUB_TOKEN lacked `actions: write`. The error was swallowed by `|| true`, so the job showed green while the gem never got pushed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d016fc4d-0414-434d-a7c2-44ad6afc54f4
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.
The
publishjob inpublish-release.ymlrunsgh workflow run push_gem.yml --ref "$tag"at the end ofscript/publishto kick off the gem push. That dispatch was failing with:because the job's
GITHUB_TOKENdidn't haveactions: write. The failure was swallowed by|| true, so publish-release ran green while the gem never got pushed to RubyGems — which is whyv4.15.0shipped a GitHub release but no gem, andpush_gem.ymlhad to be dispatched manually (and even then failed until dispatched with--ref v4.15.0).Adding
actions: writeto the job's permissions lets the dispatch succeed on the next release.