File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Inputs:
1414* ` target_dir ` The target directory to store the charts, defaults to ` . `
1515* ` helm_version ` The Helm CLI version, defaults to the latest release
1616* ` linting ` Toggle Helm linting, can be disabled by setting it to ` off `
17+ * ` commit_username ` Explicitly specify username for commit back, default to ` GITHUB_ACTOR `
18+ * ` commit_email ` Explicitly specify email for commit back, default to ` GITHUB_ACTOR@users.noreply.github.com `
1719
1820## Examples
1921
5961 repository: charts
6062 branch: gh-pages
6163 target_dir: charts
64+ commit_username: johndoe
65+ commit_email: johndoe@example.com
6266` ` `
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ inputs:
3232 linting :
3333 description : " Toggle Helm linting, can be disabled by setting it to 'off'"
3434 required : false
35+ commit_username :
36+ description : " The user name used for the commit user"
37+ required : false
38+ default : ${{ github.actor }}
39+ commit_email :
40+ description : " The email used for the commit user"
41+ required : false
42+ default : ${{ github.actor }}@users.noreply.github.com
3543runs :
3644 using : ' docker'
3745 image : ' Dockerfile'
4553 - ${{ inputs.target_dir }}
4654 - ${{ inputs.helm_version }}
4755 - ${{ inputs.linting }}
56+ - ${{ inputs.commit_username }}
57+ - ${{ inputs.commit_email }}
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ BRANCH=$6
2626TARGET_DIR=$7
2727HELM_VERSION=$8
2828LINTING=$9
29+ COMMIT_USERNAME=$1 0
30+ COMMIT_EMAIL=$1 1
2931
3032CHARTS=()
3133CHARTS_TMP_DIR=$( mktemp -d)
@@ -69,6 +71,14 @@ main() {
6971 REPO_URL=" https://x-access-token:${GITHUB_TOKEN} @github.com/${OWNER} /${REPOSITORY} "
7072 fi
7173
74+ if [[ -z " $COMMIT_USERNAME " ]]; then
75+ COMMIT_USERNAME=" ${GITHUB_ACTOR} "
76+ fi
77+
78+ if [[ -z " $COMMIT_EMAIL " ]]; then
79+ COMMIT_EMAIL=" ${GITHUB_ACTOR} @users.noreply.github.com"
80+ fi
81+
7282 locate
7383 download
7484 dependencies
@@ -122,8 +132,8 @@ upload() {
122132
123133 git clone ${REPO_URL}
124134 cd ${REPOSITORY}
125- git config user.name " ${GITHUB_ACTOR } "
126- git config user.email " ${GITHUB_ACTOR} @users.noreply.github.com "
135+ git config user.name " ${COMMIT_USERNAME } "
136+ git config user.email " ${COMMIT_EMAIL} "
127137 git remote set-url origin ${REPO_URL}
128138 git checkout ${BRANCH}
129139
You can’t perform that action at this time.
0 commit comments