hashFiles
A workflow expression function that returns one SHA-256 hash for the files matching a pattern.
In more detail
It hashes each matching file and then hashes those digests together, so the value differs from a plain shasum of the file but still changes whenever any file changes. It is the usual way to put a lock file's content into a cache key.
Related terms
- cache key — The name a cache entry is saved and looked up under, usually built from the operating system and a hash of the lock file.
- hash — A short fixed-length fingerprint calculated from data, which changes completely if even one byte of the data changes.
- SHA-256 — A widely used hash function that turns any data into a 256-bit fingerprint, shown as 64 hexadecimal characters.
Taught in
- Speeding Up Builds: Caching Dependencies — Continuous Integration & Continuous Delivery Pipelines