add option to use --signoff with git commit (#46)
* adds option to use --signoff with git commit Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * [auto] build: update compiled version * fix: remove quotes and refactor * [auto] build: update compiled version Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
This commit is contained in:
@@ -31,6 +31,11 @@ remove() {
|
||||
if [ -n "$INPUT_REMOVE" ]; then git rm $INPUT_REMOVE; fi
|
||||
}
|
||||
|
||||
commit() {
|
||||
if $INPUT_SIGNOFF; then signoffcmd=--signoff; else signoffcmd=; fi
|
||||
git commit -m "$INPUT_MESSAGE" --author="$INPUT_AUTHOR_NAME <$INPUT_AUTHOR_EMAIL>" $signoffcmd
|
||||
}
|
||||
|
||||
tag() {
|
||||
if [ -n "$INPUT_TAG" ]; then git tag $INPUT_TAG; fi
|
||||
}
|
||||
@@ -70,7 +75,7 @@ if ! git diff --cached --quiet --exit-code; then
|
||||
remove
|
||||
|
||||
echo "Creating commit..."
|
||||
git commit -m "$INPUT_MESSAGE" --author="$INPUT_AUTHOR_NAME <$INPUT_AUTHOR_EMAIL>"
|
||||
commit
|
||||
|
||||
echo "Tagging commit..."
|
||||
tag
|
||||
|
||||
Reference in New Issue
Block a user