Skip to content
user-plus

GitHub Action

Apply git user

1.1.0 Latest version

Apply git user

user-plus

Apply git user

Apply a well-known git user to 'git config user.*'

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Apply git user

uses: tshion/[email protected]

Learn more about this action in tshion/apply-git-user

Choose a version

apply-git-user (for GitHub Actions)

Apply a well-known git user to git config user.*.

  • actions-user
  • github-actions
  • (Latest git commit user)
  • (Specific user)

Usage

Basic

- uses: tshion/apply-git-user@(version)
  with:
    user: (git user)
    email: (git user email) # Set if `user` is `specific`
    name: (git user name) # Set if `user` is `specific`

Replace (git user) with one of the following values.

(git user) User Description
actions-user actions-user
github-actions github-actions
latest-commit e.g. latest commit Latest git commit user
specific e.g. specific Set up a specific user by (git user email) and (git user name).

Use working directory

- uses: actions/checkout@v4
  with:
    path: from

- uses: tshion/apply-git-user@(version)
  with:
    path: from
    user: (git user)

Use git config --global user.*

- uses: tshion/apply-git-user@(version)
  with:
    global: true
    user: (git user)

Notes

References