GitHub Action to find regex matches on files and transform them to lowercase.
Based on File Regex Replace action.
Name | Required | Default Value | Description |
---|---|---|---|
regex | βοΈ | - | The regex you want to search for. |
flags | β | g |
regex flags in javascript, see this |
include | β | .* |
Filter out which files to be modified, this should be a regex. Note that match is checked on full path, any part of the path match will be modified. You may use ^path/to/file to filter from the beginning of the files' path. By default, it matches every file. |
exclude | β | .^ |
Same as include. By default, it matches nothing. |
encoding | β | utf8 |
String encodings for files. By default, it uses UTF-8 |
path | β | . |
Path you want to start walk with. By default, it starts from . (the root of the repo) |
- name: Change url's to lowercase
uses: SofieTorch/[email protected]
with:
regex: '<a href="([^"]+(\.html|#.+))">'
flags: "g" # Optional, defaults to "g"
include: 'package\.json' # Optional, defaults to ".*"
exclude: '.^' # Optional, defaults to '.^'
encoding: 'utf8' # Optional, defaults to 'utf8'
path: '.' # Optional, defaults to '.'