github context
The expression object that describes the current run: its event, commit SHA, ref, actor, repository and more.
In more detail
Workflows use it constantly, for example ${{ github.sha }} to tag an image or ${{ github.ref }} to build a concurrency group name. Its values match the default environment variables that the runner exports.
Related terms
- workflow context — A named object, such as steps, needs, matrix, secrets or runner, that expressions read to get facts about the current run.
- default environment variables — Variables such as GITHUB_SHA, GITHUB_REF and RUNNER_OS that the runner sets for every step before your commands run.
- event payload — The full description of the event that started a run, stored as a JSON file on the runner whose path is in GITHUB_EVENT_PATH.
Taught in
- Triggers and the Event Model — Continuous Integration & Continuous Delivery Pipelines
- DORA Metrics: Measuring Your Pipeline — Continuous Integration & Continuous Delivery Pipelines
- Expressions, Contexts And The If That Is Always True — GitHub Actions (GH-200) Exam Prep
- Matrices, Needs And Concurrency: The Shape Of A Run — GitHub Actions (GH-200) Exam Prep
- Reusable Workflows: Inputs, Secrets And Outputs Across A Call — GitHub Actions (GH-200) Exam Prep
- Why It Ran, Why It Did Not: Reading Runs, Jobs And Checks — GitHub Actions (GH-200) Exam Prep