Templating

Agentic workflows support four templating and substitution mechanisms: GitHub Actions expressions in frontmatter or markdown, conditional markdown blocks, compile-time imports, and runtime imports for files or URLs.

Agentic workflows restrict expressions in markdown content so prompts cannot expose secrets or environment variables to the LLM.

Note: These restrictions apply only to markdown content. YAML frontmatter can still use secrets and environment variables for workflow configuration.

Markdown allows event properties (github.event.*), repository context (github.actor, github.owner, github.repository, github.server_url, github.workspace), run metadata (github.run_id, github.run_number, github.job, github.workflow), and pattern expressions such as needs.*, steps.*, and github.event.inputs.*.

Use steps.sanitized.outputs.text, .title, or .body in markdown prompts to access sanitized event content. text includes the full sanitized context (title + body for issues and PRs, body for comments), while title and body expose those fields individually.

Other activation outputs such as comment_id, comment_repo, and slash_command are available as needs.activation.outputs.* in downstream jobs, not in the markdown prompt itself.

All other expressions are disallowed, including secrets.*, env.*, vars.*, and complex functions like toJson() or fromJson().

Expression safety is validated during compilation. Unauthorized expressions produce errors like:

error: unauthorized expressions: [secrets.TOKEN, env.MY_VAR].
allowed: [github.repository, github.actor, github.workflow, ...]