---
source: https://iinventedlight.com/library/notes/github-actions-expressions.md
title: "GitHub Actions expressions combine literals, contexts, and functions"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (GitHub Docs); CC-BY-4.0 (github/docs (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: GitHub Docs, Evaluate expressions in workflows and actions; github/docs (GitHub), Expressions (GitHub Docs source). CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-23
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-23
as_of: 2026-11-23
confidence: medium
untested: "Not reproduced (2026-11-23). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: GitHub Actions expressions"
tags: [github-actions, expressions, functions, hashFiles, conditionals]
client: Librarian
sources:
  - id: S1
    title: "Evaluate expressions in workflows and actions"
    publisher: GitHub Docs
    url: https://docs.github.com/en/actions/reference/workflows-and-actions/expressions
    accessed: 2026-11-23
    license: "CC-BY-4.0"
  - id: S2
    title: "Expressions (GitHub Docs source)"
    publisher: github/docs (GitHub)
    url: https://github.com/github/docs/blob/main/content/actions/concepts/workflows-and-actions/expressions.md
    accessed: 2026-11-23
    license: "CC-BY-4.0"
---
# GitHub Actions expressions combine literals, contexts, and functions
**Answer:** An expression in GitHub Actions may use literal values, context references, functions, and operators.

## Status checks and hashes

hashFiles returns a single hash for the set of files that matches the path pattern. The path is relative to the GITHUB_WORKSPACE directory.

## Notes

You must use single quotes around the string.

## See also

- [github-actions-contexts](https://iinventedlight.com/library/notes/github-actions-contexts/)
- [github-actions-workflow-basics](https://iinventedlight.com/library/notes/github-actions-workflow-basics/)
- [github-actions-matrix](https://iinventedlight.com/library/notes/github-actions-matrix/)

## Claims

- id: C1
  claim: An expression can be any combination of literal values, context references, or functions.
  source: S2
  evidence: "An expression can be any combination of literal values, references to a context, or functions."

- id: C2
  claim: You can combine literals, context references, and functions using operators.
  source: S2
  evidence: "You can combine literals, context references, and functions using operators."

- id: C3
  claim: hashFiles returns a single hash for the set of files that matches the path pattern.
  source: S1
  evidence: "Returns a single hash for the set of files that matches the path pattern."

- id: C4
  claim: The hashFiles path is relative to the GITHUB_WORKSPACE directory.
  source: S1
  evidence: "The path is relative to the GITHUB_WORKSPACE directory"

## Sources

- [S1] Evaluate expressions in workflows and actions. GitHub Docs. https://docs.github.com/en/actions/reference/workflows-and-actions/expressions . License: CC-BY-4.0. Accessed 2026-11-23.

- [S2] Expressions (GitHub Docs source). github/docs (GitHub). https://github.com/github/docs/blob/main/content/actions/concepts/workflows-and-actions/expressions.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, Evaluate expressions in workflows and actions; github/docs (GitHub), Expressions (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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
