Home

Awesome

setup-git-user

GitHub Action that sets git user and email to enable committing

If you try to use git commit or git tag on GitHub Actions, it will throw an error:

<img src="https://user-images.githubusercontent.com/1402241/96522622-59905880-1239-11eb-9993-07b64bebb282.png" alt="Please tell me who you are. Run git config to set your account's default identity" width="489">

This action is a convenience action which sets the user and email in one line.

Usage

    steps:
      - uses: actions/checkout@v3
      - uses: fregante/setup-git-user@v2
      - run: git commit --message 'Something cool'
      - run: git push

New commits and tags will be assigned to the @actions user. If you want to customize the user, you don't need this action. Just use:

    steps:
      - uses: actions/checkout@v3
      - run: git config --global user.email "you@example.com"
      - run: git config --global user.name "Your Name"
      - run: git commit --message 'Something cool'
      - run: git push

Related