Skip to content

Commit

Permalink
Add support for glob patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
andstor committed Feb 25, 2022
1 parent 8687943 commit 270f25a
Show file tree
Hide file tree
Showing 13 changed files with 10,362 additions and 4,715 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.history

# Dependency directory
node_modules

Expand Down
5 changes: 5 additions & 0 deletions .mocharc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
extension: ['js', 'jsx', 'ts', 'tsx'],
spec: ['test/**.{js,ts,jsx,tsx}'],
require: 'ts-node/register'
};
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following example [workflow step](https://help.github.com/en/actions/configu
- name: "Check file existence"
uses: andstor/file-existence-action@v1
with:
files: "package.json, LICENSE, README.md, foo, bar"
files: "package.json, LICENSE, README.md, foo, *.txt"
```
## Options ⚙️
Expand All @@ -23,7 +23,9 @@ The following input variables options can/must be configured:
|Input variable|Necessity|Description|Default|
|----|----|----|----|
|`files`|Required|Comma separated string with paths to files and directories to check for existence.||
|`files`|Required|Comma separated string with paths to files and directories to check for existence. Supports [glob paterns](https://github.com/isaacs/node-glob).||
|`ignore_case`|Optional|Ignore if a file name has upper or lower cases.|`true`|
|`follow_symbolic_links`|Optional|Indicates whether to follow symbolic links.|`true`|
|`allow_failure`|Optional|Makes the Action fail on missing files.|`false`|

## Outputs
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ inputs:
files:
description: 'Comma separated string with paths to files and directories to check for existence.'
required: true
ignore_case:
description: 'Ignore if a file has upper or lower cases.'
default: false
required: false
follow_symbolic_links:
description: 'Indicates whether to follow symbolic links.'
default: true
required: false
allow_failure:
description: 'Makes the Action fail on missing files.'
default: false
Expand Down
Loading

0 comments on commit 270f25a

Please sign in to comment.