From 0822a9b930dc5cea100f9afc78b7228dac72fce9 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Tue, 4 Feb 2020 21:02:40 +0100 Subject: [PATCH] Add commit_author input option --- action.yml | 4 ++++ entrypoint.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d8a27aa..7fd5e8d 100644 --- a/action.yml +++ b/action.yml @@ -29,6 +29,10 @@ inputs: description: Email address used for the commit user required: false default: actions@github.com + commit_author: + description: Value used for the commit author + required: false + default: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> runs: using: 'docker' diff --git a/entrypoint.sh b/entrypoint.sh index f1e75c0..fbc29af 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -62,7 +62,7 @@ _add_files() { _local_commit() { echo "INPUT_COMMIT_OPTIONS: ${INPUT_COMMIT_OPTIONS}" - git commit -m "$INPUT_COMMIT_MESSAGE" --author="$GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"} + git commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"} } _push_to_github() {