GitHub Actions Contexts Reference

All GitHub Actions expression contexts and properties with type and availability.

Searchable GitHub Actions context reference covering github, env, vars, secrets, job, steps, runner, matrix, needs and inputs — with each context's key properties, types and where they are available.

How do I reference a context in a GitHub Actions workflow?

Wrap the expression in the dollar-double-brace syntax, for example the run number is referenced as github.run_number inside a ${{ }} block. Contexts are accessed with dot notation and evaluated before the job runs on the runner.

Every GitHub Actions context in one place

GitHub Actions exposes runtime data through contexts — objects you read inside expressions to make workflows dynamic. This reference lists each context with its most-used properties, their types and where each context is available. Search by context name or property path.

How it works

An expression is written inside the ${{ }} delimiters and evaluated by the Actions runner before steps execute. Contexts are the variables those expressions read. Each context covers a different scope: github describes the event and repository, env/vars/secrets carry configuration, job/steps/runner describe execution state, and matrix/needs/inputs/strategy carry build-fan-out and dependency data.

Availability matters as much as the value. Some contexts only exist in certain positions — steps is populated only after a step with an id runs, needs only when a job declares dependencies, and secrets is intentionally withheld from composite actions. The reference notes these constraints so you do not reference a context that evaluates to empty.

Property paths use dot notation, and some have a placeholder segment like steps.<id>.outputs.<name> where you substitute your own identifiers.

Tips and examples

  • Conditionally run a step based on the branch:
- if: github.ref_name == 'main'
  run: ./deploy.sh
  • Pass an output from one step to another:
- id: meta
  run: echo "tag=v1.2.3" >> "$GITHUB_OUTPUT"
- run: echo "Releasing ${{ steps.meta.outputs.tag }}"
  • Branch on the runner OS in a cross-platform matrix with runner.os, and read upstream results with needs.<job_id>.result.
  • Never print secrets.* to logs intentionally — they are masked, but echoing them risks exposure through transformations.