@actions/glob: extend hashFiles options (#2357)

* @actions/glob: extend hashFiles options

* improve hashFiles symlink handling

* Improve error handling and messaging in hashFiles function

* apply relative exclude patterns across all roots and use named minimatch import

* format error message
This commit is contained in:
Priya Gupta authored and GitHub committed 2026-07-14 08:57:04 -04:00
1 parent bc670c66dd
commit 1944b19154
5 files changed
+420 -10

No files matched your search

+23
View File
@@ -9,4 +9,27 @@ export interface HashFileOptions {
* @default true
*/
followSymbolicLinks?: boolean
/**
* Array of allowed root directories. Only files that resolve under one of
* these roots will be included in the hash.
*
* @default [GITHUB_WORKSPACE]
*/
roots?: string[]
/**
* Indicates whether files outside the allowed roots should be included.
* If false, outside-root files are skipped with a warning.
*
* @default false
*/
allowFilesOutsideWorkspace?: boolean
/**
* Array of glob patterns for files to exclude from hashing.
*
* @default []
*/
exclude?: string[]
}