File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ 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@v2.0 .0 # You can change this to use a specific version
14+ uses : EndBug/add-and-commit@v2.1 .0 # You can change this to use a specific version
1515 with : # See more info about inputs below
1616 author_name : Your Name
17171818 message : " Your commit message"
1919 path : " ."
2020 pattern : " *.js"
21+ force : false
2122 env :
2223 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
2324` ` `
@@ -29,6 +30,7 @@ Add a step like this to your workflow:
2930- `message` : the message for the commit
3031- `path` : the path(s) to stage files from
3132- `pattern` : the pattern that matches file names
33+ - `force` : whether to use the force option on git add, in order to bypass eventual gitignores
3234
3335# ## Environment variables:
3436
6365 run: eslint "src/**" --fix
6466
6567 - name: Commit changes
66- uses: EndBug/add-and-commit@v2.0 .0
68+ uses: EndBug/add-and-commit@v2.1 .0
6769 with:
6870 author_name: Your Name
6971
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ inputs:
1010 description : ' The email of the user that will be displayed as the author of the commit'
1111 required : true
121213+ force :
14+ description : ' Whether to use the force option on git add, in order to bypass eventual gitignores'
15+ required : false
16+ default : false
1317 message :
1418 description : ' The message for the commit'
1519 required : true
Original file line number Diff line number Diff line change 1919}
2020
2121add () {
22- find $INPUT_PATH -name " $INPUT_PATTERN " | while read x; do git add $x ; done
22+ if $INPUT_FORCE
23+ then find $INPUT_PATH -name " $INPUT_PATTERN " | while read x; do git add -f $x ; done
24+ else find $INPUT_PATH -name " $INPUT_PATTERN " | while read x; do git add $x ; done
25+ fi
2326}
2427
2528# This is needed to make the check work for untracked files
You can’t perform that action at this time.
0 commit comments