mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2024-12-06 02:09:04 +00:00
Add commit_user_name and commit_user_email inputs
This commit is contained in:
parent
99f6ce74b4
commit
d47024e59c
@ -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 }}
|
||||
```
|
||||
|
@ -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'
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user