Skip to content

GitHub Action to find regex matches on files and transform them to lowercase πŸ”πŸ”‘

Notifications You must be signed in to change notification settings

SofieTorch/find-and-lowercase

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Find and lowercase

GitHub Action to find regex matches on files and transform them to lowercase.
Based on File Regex Replace action.

Parameters

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)

Example

    - name: Change url's to lowercase
      uses: SofieTorch/find-and-lowercase-action@v1.1.3
      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 '.'