Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/shared/genaiscript.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ engine:
GH_AW_AGENT_VERSION: "2.5.1"
GH_AW_AGENT_MODEL_VERSION: "openai:gpt-4.1"
steps:
- name: Validate OPENAI_API_KEY secret
run: |
if [ -z "$OPENAI_API_KEY" ]; then
echo "Error: OPENAI_API_KEY secret is not set"
echo "The GenAIScript engine with openai:gpt-4.1 model requires OPENAI_API_KEY secret to be configured."
echo "Please configure this secret in your repository settings."
echo "Documentation: https://githubnext.github.io/gh-aw/reference/engines/"
exit 1
fi
echo "OPENAI_API_KEY secret is configured"
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: Install GenAIScript
run: npm install -g genaiscript@${GH_AW_AGENT_VERSION} && genaiscript --version
env:
Expand Down Expand Up @@ -33,6 +46,7 @@ engine:
GH_AW_PROMPT: ${{ env.GH_AW_PROMPT }}
GH_AW_MCP_CONFIG: ${{ env.GH_AW_MCP_CONFIG }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
---

<!--
Expand All @@ -53,10 +67,12 @@ imports:
- The original prompt file is converted to GenAI markdown format (prompt.genai.md)
- GenAIScript is executed with MCP server configuration if available
- Output is captured in the agent log file
- **OPENAI_API_KEY secret must be configured** in repository settings when using OpenAI models

**Note**:
- This workflow requires internet access to install npm packages
- The genaiscript version can be customized by setting the `GH_AW_AGENT_VERSION` environment variable (default: `2.5.1`)
- The AI model can be customized by setting the `GH_AW_AGENT_MODEL_VERSION` environment variable (default: `openai:gpt-4.1`)
- MCP server configuration is automatically passed if configured in the workflow
- When using `openai:` models, ensure the `OPENAI_API_KEY` secret is configured in your repository settings
-->
40 changes: 40 additions & 0 deletions .github/workflows/smoke-genaiscript.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading