Skip to content

Commit

Permalink
Add example with glob patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
alexesprit committed Oct 6, 2020
1 parent bc04851 commit d770ba1
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,35 @@ jobs:
```
</details>
The action supports glob patterns as well:
<details>
<summary>workflow.yml (Click to expand)</summary>
```yml
name: Resources
on: repository_dispatch
jobs:
resources:
name: Update resources
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- name: Fetch resources
run: ./scripts/fetch-resources.sh
- name: Update resources
uses: test-room-7/action-update-file@v1
with:
# Include all JS files from the `dist` directory
file-path: dist/*.js
commit-msg: Update resources
github-token: ${{ secrets.GITHUB_TOKEN }}
```
</details>
See the `fast-glob` [documentation][glob-docs] for glob syntax.

### Inputs

#### Required inputs
Expand Down Expand Up @@ -102,6 +131,7 @@ Don't push dist files; they're updated automatically by the action itself.

Licensed under the [MIT License](./LICENSE.md).

[glob-docs]: https://github.com/mrmlnc/fast-glob#pattern-syntax
[version-badge]: https://img.shields.io/github/v/release/test-room-7/action-update-file
[version-url]: https://github.com/marketplace/actions/update-files-on-github
[workflow-badge]: https://img.shields.io/github/workflow/status/test-room-7/action-update-file/Lint?label=lint
Expand Down

0 comments on commit d770ba1

Please sign in to comment.