GitHub Actions: Expressions, Contexts, Variables, and Outputs/Use repository or organization variables

Read configuration values from the `vars` context.

Section: Contexts and expressions

Use repository or organization variables

yaml
yaml
env:
  APP_ENV: ${{ vars.APP_ENV }}
Explanation

Use configuration variables for non-secret values shared across workflows.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Contexts and expressions
Use a context value in a step
Read metadata from the current workflow run.
OpenIn sheetyamlsame section
Build a matrix from JSON
Convert JSON text into a matrix object.
OpenIn sheetyamlsame section
Check if a label is present
Use `contains()` in workflow conditions.
OpenIn sheetyamlsame section
Set an environment variable for later steps
Append to `GITHUB_ENV` to persist a variable in the current job.
Set a step output
Append to `GITHUB_OUTPUT` to expose a named output.
Read a previous step output
Use the `steps` context to consume a step output.