This question is about the GitHub CoPilot Coding Agent (not the in-IDE CoPilot) - specifically how to pass secrets to the runner - based on the docs I've tried adding the OPENAI_API_KEY both at repo and env level secrets (see screenshot) - repo secret.
Relevant GitHub CoPilot agent-session messages below:
The OPENAI_API_KEY is listed in COPILOT_AGENT_INJECTED_SECRET_NAMES, which means it's available in the GitHub repository secrets
The current workflow already has the configuration to use it via ${{ secrets.OPENAI_API_KEY }}
...
However, in the current execution context (the copilot agent environment), the secret is not directly exposed as an environment variable for security reasons.
...
How and where do we pass secrets to the GitHub CoPilot Coding Agent? Thanks
asked Oct 11 at 7:32
shanlodh
1,0552 gold badges14 silver badges33 bronze badges
1 Answer 1
Add workflow_run to the GitHub Actions .yml, the Coding Agent ignores workflow_call or workflow_dispatch
answered Oct 11 at 8:05
shanlodh
1,0552 gold badges14 silver badges33 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
Explore related questions
See similar questions with these tags.
lang-yaml