Default username and email for github workflow actions
I think this would be a nice feature. It would also lead to a more consistent appearance of commits created by GitHub Actions. I’m currently wondering which email address and username I should use for the time being.
- The README.md suggests
github-actions <github-actions@github.com>
. However, this email is not recognized by the platform. GitHub displays the author of the commit with the generic icon and without a link.
git config --global user.name "github-actions" git config --global user.email "github-actions@github.com"
- A thread in the GitHub Support Community suggests
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
. This seems to work nicely. The author of the commit has the same icon and name as GitHub Actions everywhere else. The link goes to https://github.com/features/actions as I would expect. I’m just wondering if there is any caveat since it is not promoted in the README.md.
git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- Most repositories I found seem to use
GitHub Action <action@github.com>
. I don’t know where this is comming from. GitHub seems to link it to some user but clicking on the user opens a 404-page. The icon and name doesn’t match what is usually shown for GitHub Actions.
git config --global user.name "GitHub Action" git config --global user.email "action@github.com"
Conclusion
If there is no caveat for the second option, I would suggest that the checkout action configures Git accordingly if none of both options is already set. (Alternatively, GitHub’s runners could be updated to use this configuration.)
Working Examples For Setup Github Actions Username And Email
source issues: