Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fregante/setup-git-user
GitHub Action that sets the git user and email to enable commiting
https://github.com/fregante/setup-git-user
Last synced: 29 days ago
JSON representation
GitHub Action that sets the git user and email to enable commiting
- Host: GitHub
- URL: https://github.com/fregante/setup-git-user
- Owner: fregante
- License: mit
- Created: 2020-10-19T23:47:44.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T07:11:05.000Z (over 1 year ago)
- Last Synced: 2024-05-01T21:17:29.895Z (7 months ago)
- Size: 213 KB
- Stars: 71
- Watchers: 4
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# 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:
This action is a convenience action which sets the user and email in one line.
# Usage
```yaml
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](https://github.com/actions) user. If you want to customize the user, **you don't need this action**. Just use:
```yaml
steps:
- uses: actions/checkout@v3
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Your Name"
- run: git commit --message 'Something cool'
- run: git push
```## Related
- [daily-version-action](https://github.com/fregante/daily-version-action) - Creates a new tag using the format Y.M.D, but only if HEAD isn’t already tagged.
- [title-to-labels-action](https://github.com/fregante/title-to-labels-action) - Cleans up the titles of issues and PRs from common opening keywords.