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:
3535 # Default: false
3636 force : true
3737
38+ # Whether to use the --signoff option on `git commit`
39+ # Default: false
40+ signoff : true
41+
3842 # The message for the commit
3943 # Default: 'Commit from GitHub Actions'
4044 message : ' Your commit message'
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ inputs:
2020 description : Whether to use the force option on git add, in order to bypass eventual gitignores
2121 required : false
2222 default : " false"
23+ signoff :
24+ description : Whether to use the signoff option on git commit
25+ required : false
26+ default : " false"
2327 message :
2428 description : The message for the commit
2529 required : false
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ remove() {
3131 if [ -n " $INPUT_REMOVE " ]; then git rm $INPUT_REMOVE ; fi
3232}
3333
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+
3439tag () {
3540 if [ -n " $INPUT_TAG " ]; then git tag $INPUT_TAG ; fi
3641}
@@ -70,7 +75,7 @@ if ! git diff --cached --quiet --exit-code; then
7075 remove
7176
7277 echo " Creating commit..."
73- git commit -m " $INPUT_MESSAGE " --author= " $INPUT_AUTHOR_NAME < $INPUT_AUTHOR_EMAIL > "
78+ commit
7479
7580 echo " Tagging commit..."
7681 tag
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ remove() {
3131 if [ -n " $INPUT_REMOVE " ]; then git rm $INPUT_REMOVE ; fi
3232}
3333
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+
3439tag () {
3540 if [ -n " $INPUT_TAG " ]; then git tag $INPUT_TAG ; fi
3641}
@@ -70,7 +75,7 @@ if ! git diff --cached --quiet --exit-code; then
7075 remove
7176
7277 echo " Creating commit..."
73- git commit -m " $INPUT_MESSAGE " --author= " $INPUT_AUTHOR_NAME < $INPUT_AUTHOR_EMAIL > "
78+ commit
7479
7580 echo " Tagging commit..."
7681 tag
You can’t perform that action at this time.
0 commit comments