-
Notifications
You must be signed in to change notification settings - Fork 424
[schema-coverage] feat: add schema coverage demo for secrets field #39342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| description: Demonstrates the `secrets` schema field | ||
| on: | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| engine: codex | ||
| secrets: | ||
| API_TOKEN: ${{ secrets.API_TOKEN }} | ||
| timeout-minutes: 5 | ||
| --- | ||
|
|
||
| # Schema Demo: `secrets` | ||
|
|
||
| This workflow was auto-generated to demonstrate usage of the `secrets` field in the | ||
| gh-aw frontmatter schema. It exists solely to achieve 100% schema feature coverage. | ||
|
|
||
| ## What `secrets` Does | ||
|
|
||
| Secret values passed to workflow execution. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [/grill-with-docs] The description does not fully capture the schema vocabulary for this field. The schema documentation states secrets are "typically used to provide secrets to MCP servers or custom engines" and explicitly notes that for reusable workflows there is a separate 💡 Suggested description## What `secrets` Does
Secret values passed to MCP servers or custom engines during workflow execution.
For passing secrets to reusable workflows, use the `jobs.<job_id>.secrets` field instead.This matches the language used in the schema definition itself and helps authors choose the right field. |
||
|
|
||
| ## Task | ||
|
|
||
| Call `noop` -- this is a coverage-only demo workflow. | ||
|
|
||
| **Important**: Always call the `noop` safe-output tool. | ||
|
|
||
| ```json | ||
| {"noop": {"message": "Coverage demo for `secrets` -- no action needed."}} | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/grill-with-docs] The demo demonstrates only the simple string form of secret values; the schema also supports an object form with
valueanddescriptionproperties.Since the goal is schema feature coverage and the
oneOfin the schema makes both shapes equally valid, showing only the string form leaves the richer shape undocumented in the demos directory.💡 Suggested frontmatter (showing both forms)
Adding a second secret with the object form demonstrates that
descriptioncan be used to annotate secrets for readers of the workflow, making the demo more instructive.