Files
glob/src/internal-hash-file-options.ts
Priya Gupta 1944b19154 @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
2026-07-14 08:57:04 -04:00

36 lines
785 B
TypeScript

/**
* Options to control globbing behavior
*/
export interface HashFileOptions {
/**
* Indicates whether to follow symbolic links. Generally should set to false
* when deleting files.
*
* @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[]
}