diff --git a/README.md b/README.md index 36dafab..cdf734e 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,10 @@ Add the following step at the end of your job. # Optional repository path repository: . + # Optional commit user settings + commit_user_name: My GitHub Actions Bot + commit_user_email: my-github-actions-bot@example.org + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` diff --git a/action.yml b/action.yml index 2fb26e7..d8a27aa 100644 --- a/action.yml +++ b/action.yml @@ -21,6 +21,14 @@ inputs: description: Path to git repository required: false default: '.' + commit_user_name: + description: Name used for the commit user + required: false + default: GitHub Actions + commit_user_email: + description: Email address used for the commit user + required: false + default: actions@github.com runs: using: 'docker' diff --git a/entrypoint.sh b/entrypoint.sh index 1fe69fa..f1e75c0 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -44,8 +44,8 @@ _setup_git ( ) { EOF chmod 600 $HOME/.netrc - git config --global user.email "actions@github.com" - git config --global user.name "GitHub Actions" + git config --global user.name "$INPUT_COMMIT_USER_NAME" + git config --global user.email "$INPUT_COMMIT_USER_EMAIL" } _switch_to_branch() {