Skip to content

Commit

Permalink
Adds all needed information for andstor#160 into the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joergi committed Mar 19, 2024
1 parent 8d34ad6 commit 148c88d
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ The following example [workflow step](https://help.github.com/en/actions/configu
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. 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`|
|`fail`|Optional|Makes the Action fail on missing files.|`false`|
| Input variable |Necessity| Description |Default|
|---------------------|----|--------------------------------------------------------------------------------------------------------------------------------------------------|----|
| `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`|
| `fail` |Optional| Makes the Action fail on missing files. |`false`|
| `working dir` |Optional| Uses the github working directory. |`false`|


## Outputs
- `files_exists`: Outputs `true` if the file(s) exists, otherwise `false`.
Expand All @@ -41,20 +43,34 @@ on: [push, pull_request]
jobs:
file_existence:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./.github
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v3
with:
files: "package.json, LICENSE, README.md"
files: "package.json, LICENSE, README.md, .github/dependabot.yml"
- name: File exists
if: steps.check_files.outputs.files_exists == 'true'
# Only runs if all of the files exists
run: echo All files exists!
- name: Check file existence with working dir
id: check_files_working_dir
uses: andstor/file-existence-action@v3
with:
files: "dependabot.yml"
use working dir: true
- name: File exists
if: steps.check_files_working_dir.outputs.files_exists == 'true'
# Only runs if all of the files exists
run: echo All files exists!
```

## License
Expand Down

0 comments on commit 148c88d

Please sign in to comment.