mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-12 19:30:30 +02:00
feat: Allow overriding actor (#126)
Co-authored-by: Conrad <grosserconrad@gmail.com>
This commit is contained in:
@@ -17,8 +17,17 @@ _git_setup ( ) {
|
||||
EOF
|
||||
chmod 600 $HOME/.netrc
|
||||
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Action"
|
||||
# If GIT_IDENTITY="actor"
|
||||
if [ "$INPUT_GIT_IDENTITY" = "author" ]; then
|
||||
git config --global user.name "$GITHUB_ACTOR"
|
||||
git config --global user.email "$GITHUB_ACTOR@@users.noreply.github.com"
|
||||
elif [ "$INPUT_GIT_IDENTITY" = "actions" ]; then
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Action"
|
||||
else
|
||||
echo "GIT_IDENTITY must be either 'actor' or 'actions'";
|
||||
exit 1;
|
||||
fi;
|
||||
}
|
||||
|
||||
# Checks if any files are changed
|
||||
|
||||
Reference in New Issue
Block a user