Skip to content

Commit

Permalink
外部スクリプトの統合
Browse files Browse the repository at this point in the history
  • Loading branch information
tshion committed Apr 27, 2024
1 parent efb0152 commit 3b6466f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 33 deletions.
32 changes: 31 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,34 @@ runs:
GLOBAL: ${{ inputs.global }}
PATH_DIR: ${{ inputs.path }}
USER: ${{ inputs.user }}
run: bash ${{ github.action_path }}execute.bash
run: |
echo "path: $PATH_DIR"
cd $PATH_DIR
echo "moved path: $PATH_DIR"
EMAIL=''
NAME=''
if [ $USER = 'actions-user' ]; then
EMAIL='65916846+actions-user@users.noreply.github.com'
NAME='actions-user'
elif [ $USER = 'github-actions' ]; then
EMAIL='41898282+github-actions[bot]@users.noreply.github.com'
NAME='github-actions[bot]'
elif [ $USER = 'latest-commit' ]; then
EMAIL="$(git --no-pager log --format=format:'%ae' -n 1)"
NAME="$(git --no-pager log --format=format:'%an' -n 1)"
else
echo "::error::Please set 'user' to either 'actions-user', 'github-actions' or 'latest-commit'."
exit 1
fi
echo "name: $NAME"
echo "email: $EMAIL"
FLAG='--local'
if [ $GLOBAL = 'true' ]; then
FLAG='--global'
fi
echo "flag: $FLAG"
git config $FLAG user.email $EMAIL
git config $FLAG user.name $NAME
32 changes: 0 additions & 32 deletions execute.bash

This file was deleted.

0 comments on commit 3b6466f

Please sign in to comment.