Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't impersonante users #49

Merged
merged 1 commit into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
| git-commit-message | Commit message | `terraform-docs: automated action` | false |
| git-push | If true it will commit and push the changes | `false` | false |
| git-push-sign-off | If true it will sign-off commit | `false` | false |
| git-push-user-email | If empty the no-reply email of the PR author will be used (i.e. `${GITHUB\_ACTOR}@users.noreply.github.com`) | `""` | false |
| git-push-user-name | If empty the name of the PR author will be used (i.e. `${GITHUB\_ACTOR}`) | `""` | false |
| git-push-user-email | If empty the no-reply email of the GitHub Actions bot will be used (i.e. `github-actions[bot]@users.noreply.github.com`) | `""` | false |
| git-push-user-name | If empty the name of the GitHub Actions bot will be used (i.e. `github-actions[bot]`) | `""` | false |
Comment on lines +57 to +58
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table is auto-generated using the content of action.yml. Please update the action file and run ./scripts/update-readme.sh (which in this case shouldn't change README any further)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, didn't know about that

| indention | Indention level of Markdown sections [1, 2, 3, 4, 5] | `2` | false |
| output-file | File in module directory where the docs should be placed | `USAGE.md` | false |
| output-format | terraform-docs format to generate content (see [all formats](https://github.com/terraform-docs/terraform-docs/blob/master/docs/FORMATS\_GUIDE.md)) (ignored if `config-file` is set) | `markdown table` | false |
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ inputs:
required: false
default: "false"
git-push-user-name:
description: If empty the name of the PR author will be used (i.e. `${GITHUB_ACTOR}`)
description: If empty the name of the GitHub Actions bot will be used (i.e. `github-actions[bot]`)
required: false
default: ""
git-push-user-email:
description: If empty the no-reply email of the PR author will be used (i.e. `${GITHUB_ACTOR}@users.noreply.github.com`)
description: If empty the no-reply email of the GitHub Actions bot will be used (i.e. `github-actions[bot]@users.noreply.github.com`)
required: false
default: ""
git-commit-message:
Expand Down
4 changes: 2 additions & 2 deletions src/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ git_setup() {
if [ -n "${GIT_PUSH_USER_NAME}" ]; then
git config --global user.name "${GIT_PUSH_USER_NAME}"
else
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.name github-actions[bot]
fi

if [ -n "${GIT_PUSH_USER_EMAIL}" ]; then
git config --global user.email "${GIT_PUSH_USER_EMAIL}"
else
git config --global user.email "${GITHUB_ACTOR}"@users.noreply.github.com
git config --global user.email github-actions[bot]@users.noreply.github.com
fi

git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
Expand Down