https://github.com/thiagodnf/string-replacer
A GitHub Action for finding and replacing strings in your project files
https://github.com/thiagodnf/string-replacer
continuous-integration github-actions
Last synced: about 1 month ago
JSON representation
A GitHub Action for finding and replacing strings in your project files
- Host: GitHub
- URL: https://github.com/thiagodnf/string-replacer
- Owner: thiagodnf
- License: mit
- Created: 2023-07-02T14:06:33.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-03T01:47:41.000Z (almost 3 years ago)
- Last Synced: 2026-04-17T11:40:20.835Z (2 months ago)
- Topics: continuous-integration, github-actions
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/string-replacer
- Size: 500 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# String Replacer
A GitHub Action for finding and replacing strings in your project files
[](https://github.com/thiagodnf/string-replacer/releases/latest)
[](https://github.com/thiagodnf/string-replacer/graphs/contributors)
[](https://github.com/thiagodnf/string-replacer)
[](https://opensource.org/licenses/mit-license.php)
[](https://github.com/ellerbrock/open-source-badges/)
## Input
### `find`
**Required** The regular expression you want to be replaced
### `replace`
**Required** The new string to be replaced
### `include`
**Optional** A glob of files to include in our find and replace. Default is `**`
### `exclude`
**Optional** A glob of files to exclude in our find and replace. Default is `.git/**`
## Outputs
### `modifiedFiles`
The number of files which have been modified
## Usage
### Example workflow
```yaml
name: My Workflow
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Find and Replace
uses: thiagodnf/string-replacer@v1.0.2
with:
find: "hello"
replace: "world"
include: |
test/**/*.md
exclude: |
.git/**
node_modules/**
```
## Questions or Suggestions
Feel free to access the discussions tab as you need
## Contribute
Contributions to this project are very welcome! We can't do this alone! Feel free to fork this project, work on it and then make a pull request.
## License
Licensed under the [MIT license](LICENSE).
## Donate
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, reach out to me if you want to do it.
Thanks!
❤️