${{ ... }} is your templating engine
The expression syntax ${{ ... }} evaluates inside YAML strings and is how you do conditionals, lookups, and string manipulation in workflows.
The contexts
github— repo, ref, sha, actor, event, workflow info.env— env vars at the current scope.vars— repo/org/env variables.secrets— repo/org/env secrets.job— info about the current job.steps— outputs from previous steps in this job.matrix— current matrix cell's values.needs— outputs ofneeds:jobs.inputs— inputs fromworkflow_dispatchorworkflow_call.runner— info about the runner (OS, arch, temp dir).
Operators and functions
- Comparisons:
==,!=,<,<=,>,>=. - Logic:
&&,||,!. - Common functions:
contains(haystack, needle),startsWith(s, prefix),endsWith(s, suffix),format('hello {0}', name),fromJSON(s),toJSON(obj),hashFiles('**/lockfile'). - Status:
success(),failure(),cancelled(),always().