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:
11
11
12
12
``` yaml
13
13
- 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
15
15
with : # See more info about inputs below
16
16
author_name : Your Name
17
17
author_email : mail@example.com
18
18
message : " Your commit message"
19
19
path : " ."
20
20
pattern : " *.js"
21
+ force : false
21
22
env :
22
23
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
23
24
` ` `
@@ -29,6 +30,7 @@ Add a step like this to your workflow:
29
30
- `message` : the message for the commit
30
31
- `path` : the path(s) to stage files from
31
32
- `pattern` : the pattern that matches file names
33
+ - `force` : whether to use the force option on git add, in order to bypass eventual gitignores
32
34
33
35
# ## Environment variables:
34
36
63
65
run: eslint "src/**" --fix
64
66
65
67
- name: Commit changes
66
- uses: EndBug/add-and-commit@v2.0 .0
68
+ uses: EndBug/add-and-commit@v2.1 .0
67
69
with:
68
70
author_name: Your Name
69
71
author_email: mail@example.com
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ inputs:
10
10
description : ' The email of the user that will be displayed as the author of the commit'
11
11
required : true
12
12
default : ' actions@github.com'
13
+ force :
14
+ description : ' Whether to use the force option on git add, in order to bypass eventual gitignores'
15
+ required : false
16
+ default : false
13
17
message :
14
18
description : ' The message for the commit'
15
19
required : true
Original file line number Diff line number Diff line change 19
19
}
20
20
21
21
add () {
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
23
26
}
24
27
25
28
# This is needed to make the check work for untracked files
You can’t perform that action at this time.
0 commit comments