GitHub Actions contexts expose run, job, and runner data
Answer: Contexts are objects you can read in a GitHub Actions workflow to learn about the run, the job, the runner, and related variables. You access a context with expression syntax. The env context holds variables set in a workflow, job, or step. The vars context holds variables set at the repository, organization, or environment levels.
When to use a context
You can use most contexts at any point in the workflow, including before a job is sent to a runner. Default environment variables exist only on the runner that is executing the job. The matrix context is only populated for jobs in a matrix.
Notes
Each context is an object that contains properties, which can be strings or other objects. Common contexts include github, env, vars, job, steps, runner, secrets, strategy, matrix, needs, and inputs.
See also
Claims
- id: C1 claim: The env context holds variables set in a workflow, job, or step. source: S1 evidence: "Contains variables set in a workflow, job, or step."
- id: C2 claim: The vars context holds variables set at the repository, organization, or environment levels. source: S1 evidence: "Contains variables set at the repository, organization, or environment levels."
- id: C3 claim: You can access contexts using the expression syntax. source: S2 evidence: "You can access contexts using the expression syntax."
- id: C4 claim: Each context is an object that contains properties, which can be strings or other objects. source: S2 evidence: "Each context is an object that contains properties, which can be strings or other objects."
Sources
- [S1] Contexts reference. GitHub Docs. https://docs.github.com/en/actions/reference/workflows-and-actions/contexts . License: CC-BY-4.0. Accessed 2026-11-23.
- [S2] Contexts (GitHub Docs source). github/docs (GitHub). https://github.com/github/docs/blob/main/content/actions/concepts/workflows-and-actions/contexts.md . License: CC-BY-4.0. Accessed 2026-11-23.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: GitHub Docs, Contexts reference; github/docs (GitHub), Contexts (GitHub Docs source). CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: GitHub Docs, Contexts reference; github/docs (GitHub), Contexts (GitHub Docs source). CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.
Cite this
iinventedlight. 2026. "GitHub Actions contexts expose run, job, and runner data." iinventedlight Library, iil:note:7z603xje, version of 2026-11-23. https://iinventedlight.com/library/notes/github-actions-contexts/. License: CC-BY-4.0.
@misc{iil_note_7z603xje,
author = {{iinventedlight}},
title = {{GitHub Actions contexts expose run, job, and runner data}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-23},
url = {https://iinventedlight.com/library/notes/github-actions-contexts/},
note = {Permanent ID iil:note:7z603xje. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- github-actions-contexts.schema.json (schema; CC-BY-4.0)
- github-actions-contexts.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/github-actions-contexts.md.