0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-11-24 18:09:26 -05:00

docs: user: actions: hashFiles does not work

Refs: https://code.forgejo.org/forgejo/runner/issues/54#issuecomment-500
This commit is contained in:
Earl Warren 2023-07-15 02:48:51 +02:00 committed by Caesar Schinas
parent 36c42ea9f3
commit ccb4c2d154
No known key found for this signature in database
GPG key ID: AE9108461BEA5ACF

View file

@ -84,7 +84,6 @@ In a `workflow` file strings that look like `${{ ... }}` are evaluated by the `F
- `join( array, optionalSeparator )`. The value for `array` can be an array or a string. All values in `array` are concatenated into a string. If you provide `optionalSeparator`, it is inserted between the concatenated values. Otherwise, the default separator `,` is used. Casts values to a string.
- `toJSON(value)`. Returns a pretty-print JSON representation of `value`.
- `fromJSON(value)`. Returns a JSON object or JSON data type for `value`. You can use this function to provide a JSON object as an evaluated expression or to convert environment variables from a string.
- `hashFiles(path)`. Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`. This function calculates an individual SHA-256 hash for each matched file, and then uses those hashes to calculate a final SHA-256 hash for the set of files. If the `path` pattern does not match any files, this returns an empty string. For more information about SHA-256, see "[SHA-2](https://en.wikipedia.org/wiki/SHA-2).". You shell globs to match file names.
## Caching commonly used files