diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0233186..9be1d28 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Test on: push: branches: - - main + - master paths-ignore: - '**.md' pull_request: diff --git a/README.md b/README.md index 1f1e3eb..cabcd5d 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ steps: !path/**/*.tmp ``` -For supported wildcards along with behavior and documentation, see [@actions/glob](https://github.com/actions/toolkit/tree/main/packages/glob) which is used internally to search for files. +For supported wildcards along with behavior and documentation, see [@actions/glob](https://github.com/actions/toolkit/tree/master/packages/glob) which is used internally to search for files. If a wildcard pattern is used, the path hierarchy will be preserved after the first wildcard pattern. @@ -86,7 +86,7 @@ If multiple paths are provided as input, the least common ancestor of all the se Relative and absolute file paths are both allowed. Relative paths are rooted against the current working directory. Paths that begin with a wildcard character should be quoted to avoid being interpreted as YAML aliases. -The [@actions/artifact](https://github.com/actions/toolkit/tree/main/packages/artifact) package is used internally to handle most of the logic around uploading an artifact. There is extra documentation around upload limitations and behavior in the toolkit repo that is worth checking out. +The [@actions/artifact](https://github.com/actions/toolkit/tree/master/packages/artifact) package is used internally to handle most of the logic around uploading an artifact. There is extra documentation around upload limitations and behavior in the toolkit repo that is worth checking out. ### Conditional Artifact Upload diff --git a/dist/index.js b/dist/index.js index 4208115..85179f2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6225,8 +6225,6 @@ const path = __importStar(__webpack_require__(622)); const core_1 = __webpack_require__(470); const fs_1 = __webpack_require__(747); const path_1 = __webpack_require__(622); -const util_1 = __webpack_require__(669); -const stats = util_1.promisify(fs_1.stat); function getDefaultGlobOptions() { return { followSymbolicLinks: true, @@ -6295,9 +6293,7 @@ function findFilesToUpload(searchPath, globOptions) { directories so filter any directories out from the raw search results */ for (const searchResult of rawSearchResults) { - const fileStats = yield stats(searchResult); - // isDirectory() returns false for symlinks if using fs.lstat(), make sure to use fs.stat() instead - if (!fileStats.isDirectory()) { + if (!fs_1.lstatSync(searchResult).isDirectory()) { core_1.debug(`File:${searchResult} was found using the provided searchPath`); searchResults.push(searchResult); } diff --git a/package-lock.json b/package-lock.json index 61facf7..d217fbd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7975,9 +7975,9 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "lodash.memoize": { diff --git a/src/search.ts b/src/search.ts index 5a4911a..f507f40 100644 --- a/src/search.ts +++ b/src/search.ts @@ -1,10 +1,8 @@ import * as glob from '@actions/glob' import * as path from 'path' import {debug, info} from '@actions/core' -import {stat} from 'fs' +import {lstatSync} from 'fs' import {dirname} from 'path' -import {promisify} from 'util' -const stats = promisify(stat) export interface SearchResult { filesToUpload: string[] @@ -94,9 +92,7 @@ export async function findFilesToUpload( directories so filter any directories out from the raw search results */ for (const searchResult of rawSearchResults) { - const fileStats = await stats(searchResult) - // isDirectory() returns false for symlinks if using fs.lstat(), make sure to use fs.stat() instead - if (!fileStats.isDirectory()) { + if (!lstatSync(searchResult).isDirectory()) { debug(`File:${searchResult} was found using the provided searchPath`) searchResults.push(searchResult) } else {