Repository navigation
ci: pass environment secrets to called workflows by name - #2238
Merged
Merged
Conversation
A called workflow only sees an environment secret if the caller passes it, by name or with `secrets: inherit`; otherwise it is silently empty. The scheduled Dependabot run therefore failed to create the app token, and the release announcement had no AI API key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
The scheduled Dependabot run failed in every `Apply` job (run 44469573889): `The 'client-id' (or deprecated 'app-id') input must be set to a non-empty string`.
A job in a called workflow can use secrets of its `environment`, but only if the caller passes them, by name or with `secrets: inherit`. Otherwise they resolve to an empty string without an error (docs). Dispatching `review-dependabot-pr.yml` directly worked, which hid the problem.
This passes the secrets by name and declares them in `on.workflow_call.secrets`:
Passing a secret by name doesn't widen access: the value still comes from the environment of the job that uses it, so the review job (`ai-agents`) can't read the app credentials and the apply job (`dependency-updates`) can't read the AI key.
🤖 Generated with Claude Code