File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,13 @@ Add a step like this to your workflow:
1111
1212``` yaml
1313- name : Commit changes # This is the step name that will be displayed in your runs
14- uses : EndBug/add-and-commit@latest # You can change this to use a specific version
14+ uses : EndBug/add-and-commit@v2.0.0 # You can change this to use a specific version
1515 with : # See more info about inputs below
1616 author_name : Your Name
1717 author_email : mail@example.com
1818 message : " Your commit message"
19- path : ./*.js
19+ path : " ."
20+ pattern : " *.js"
2021 env :
2122 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
2223` ` `
@@ -27,6 +28,7 @@ Add a step like this to your workflow:
2728- `author_email` : the email of the user that will be displayed as the author of the commit
2829- `message` : the message for the commit
2930- `path` : the path(s) to stage files from
31+ - `pattern` : the pattern that matches file names
3032
3133# ## Environment variables:
3234
@@ -61,12 +63,13 @@ jobs:
6163 run: eslint "src/**" --fix
6264
6365 - name: Commit changes
64- uses: EndBug/add-and-commit@latest
66+ uses: EndBug/add-and-commit@v2.0.0
6567 with:
6668 author_name: Your Name
6769 author_email: mail@example.com
6870 message: "Your commit message"
69- path: ./*.js
71+ path: "."
72+ pattern: "*.js"
7073 env:
7174 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7275` ` `
Original file line number Diff line number Diff line change @@ -17,8 +17,12 @@ inputs:
1717 path :
1818 description : ' The path to stage files from'
1919 required : true
20- default : ' ./**/*.*'
21-
20+ default : ' .'
21+ pattern :
22+ description : ' The pattern that mathces file names'
23+ required : false
24+ default : " *.*"
25+
2226runs :
2327 using : ' docker'
2428 image : ' Dockerfile'
Original file line number Diff line number Diff line change 1919}
2020
2121add () {
22- find $INPUT_PATH -name " *.* " | while read x; do git add $x ; done
22+ find $INPUT_PATH -name $INPUT_PATTERN | while read x; do git add $x ; done
2323}
2424
2525# This is needed to make the check work for untracked files
You can’t perform that action at this time.
0 commit comments