File tree Expand file tree Collapse file tree 4 files changed +20
-2
lines changed Expand file tree Collapse file tree 4 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ Add a step like this to your workflow:
35
35
# Default: false
36
36
force : true
37
37
38
+ # Whether to use the --signoff option on `git commit`
39
+ # Default: false
40
+ signoff : true
41
+
38
42
# The message for the commit
39
43
# Default: 'Commit from GitHub Actions'
40
44
message : ' Your commit message'
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ inputs:
20
20
description : Whether to use the force option on git add, in order to bypass eventual gitignores
21
21
required : false
22
22
default : " false"
23
+ signoff :
24
+ description : Whether to use the signoff option on git commit
25
+ required : false
26
+ default : " false"
23
27
message :
24
28
description : The message for the commit
25
29
required : false
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ remove() {
31
31
if [ -n " $INPUT_REMOVE " ]; then git rm $INPUT_REMOVE ; fi
32
32
}
33
33
34
+ commit () {
35
+ if $INPUT_SIGNOFF ; then signoffcmd=--signoff; else signoffcmd=; fi
36
+ git commit -m " $INPUT_MESSAGE " --author=" $INPUT_AUTHOR_NAME <$INPUT_AUTHOR_EMAIL >" $signoffcmd
37
+ }
38
+
34
39
tag () {
35
40
if [ -n " $INPUT_TAG " ]; then git tag $INPUT_TAG ; fi
36
41
}
@@ -70,7 +75,7 @@ if ! git diff --cached --quiet --exit-code; then
70
75
remove
71
76
72
77
echo " Creating commit..."
73
- git commit -m " $INPUT_MESSAGE " --author= " $INPUT_AUTHOR_NAME < $INPUT_AUTHOR_EMAIL > "
78
+ commit
74
79
75
80
echo " Tagging commit..."
76
81
tag
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ remove() {
31
31
if [ -n " $INPUT_REMOVE " ]; then git rm $INPUT_REMOVE ; fi
32
32
}
33
33
34
+ commit () {
35
+ if $INPUT_SIGNOFF ; then signoffcmd=--signoff; else signoffcmd=; fi
36
+ git commit -m " $INPUT_MESSAGE " --author=" $INPUT_AUTHOR_NAME <$INPUT_AUTHOR_EMAIL >" $signoffcmd
37
+ }
38
+
34
39
tag () {
35
40
if [ -n " $INPUT_TAG " ]; then git tag $INPUT_TAG ; fi
36
41
}
@@ -70,7 +75,7 @@ if ! git diff --cached --quiet --exit-code; then
70
75
remove
71
76
72
77
echo " Creating commit..."
73
- git commit -m " $INPUT_MESSAGE " --author= " $INPUT_AUTHOR_NAME < $INPUT_AUTHOR_EMAIL > "
78
+ commit
74
79
75
80
echo " Tagging commit..."
76
81
tag
You can’t perform that action at this time.
0 commit comments