Repository navigation
fix(release): start CI on the Version Packages PR without a stored secret - #62
Merged
Merged
Conversation
…cret Replace the optional GitHub App token from #60 with a secretless dispatch. GITHUB_TOKEN-caused events start no workflows, so the version PR got no checks and stayed blocked on the required `code / all-checks`. workflow_dispatch is the one event GITHUB_TOKEN may trigger, so after changesets/action opens or updates the PR, the release job runs `gh workflow run <ci-workflow> --ref changeset-release/<branch>`. - Remove RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY, HAS_RELEASE_APP, the create-github-app-token step and the token fallbacks. - Update the README caller example and adoption steps. - Add a `ci-workflow` input (default pull-request.yml) and document `actions: write`; callers must grant it and add `workflow_dispatch:` to their CI workflow. A failed dispatch warns, never fails the release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: unional <homawong@gmail.com>
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
A called workflow cannot request a permission its caller did not grant; the run fails at startup. Existing callers grant only id-token, contents and pull-requests, so declaring actions: write would break every release. The dispatch stays fail-soft: without the caller grant it 403s and warns, now with a message that names the missing actions: write grant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: unional <homawong@gmail.com>
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.
Why
changesets/action opens the "Version Packages" PR with the built-in
GITHUB_TOKEN. GitHub starts no workflows for events that token causes, so the PR gets no checks and sits blocked on the requiredcode / all-checks. #60 fixed that with an optional GitHub App token, but that keeps a long-lived private key in org secrets. This replaces it with a secretless design.workflow_dispatchis the one eventGITHUB_TOKENmay trigger. After changesets/action opens or updates the PR (its PR-number output is set andpublishedis nottrue), the release job runsgh workflow run "$CI_WORKFLOW" --ref changeset-release/<branch>. Check runs from that dispatch attach to the branch head under the GitHub Actions app, so they satisfy the required check by name.Changes
Revert fix(release): open the Version Packages PR with the repobuddy App token #60's App-token code:
RELEASE_APP_ID/RELEASE_APP_PRIVATE_KEYsecrets,HAS_RELEASE_APP, thecreate-github-app-tokenstep, and the token fallbacks.Add a
workflow_callinputci-workflow(defaultpull-request.yml) and the dispatch step. If the dispatch fails (the caller's CI has noworkflow_dispatch:, or the caller did not grantactions: write), it emits a::warning::that names the fix and does not fail the release. The workflow does not declareactions: writeitself: a called workflow cannot request a permission its caller did not grant, and existing callers grant onlyid-token,contentsandpull-requests, so declaring it would fail their releases at startup.Document in the header that the caller must grant
actions: write.Rewrite the header comments to explain the design.
README: drop the
secrets:lines from the caller examples, addactions: writeto the permissions example, add theworkflow_dispatch:adoption step, and replace the App-token rationale.actionlint 1.7.7 (with shellcheck) passes. There was no
NPM_TOKENsecret before #60, so there is none to keep.Caller changes
actions: writeto the job that calls the release workflow.workflow_dispatch:to the CI workflow'son:block.🤖 Generated with Claude Code