File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,9 @@ inputs:
20
20
description : ' Keep only the latest commit on a GitHub Pages branch'
21
21
required : false
22
22
default : ' false'
23
+ username :
24
+ description : ' Set Git user.name'
25
+ required : false
26
+ useremail :
27
+ description : ' Set Git user.email'
28
+ required : false
Original file line number Diff line number Diff line change @@ -102,8 +102,16 @@ else
102
102
fi
103
103
104
104
# push to publishing branch
105
- git config user.name " ${GITHUB_ACTOR} "
106
- git config user.email " ${GITHUB_ACTOR} @users.noreply.github.com"
105
+ if [[ -n " ${INPUT_USERNAME} " ]]; then
106
+ git config user.name " ${INPUT_USERNAME} "
107
+ else
108
+ git config user.name " ${GITHUB_ACTOR} "
109
+ fi
110
+ if [[ -n " ${INPUT_USEREMAIL} " ]]; then
111
+ git config user.email " ${INPUT_USEREMAIL} "
112
+ else
113
+ git config user.email " ${GITHUB_ACTOR} @users.noreply.github.com"
114
+ fi
107
115
git remote rm origin || true
108
116
git remote add origin " ${remote_repo} "
109
117
git add --all
You can’t perform that action at this time.
0 commit comments