Check if git binary exists
This commit is contained in:
parent
7106b2184a
commit
ab7a203db7
|
@ -70,6 +70,9 @@ inputs:
|
|||
create_branch:
|
||||
description: Create new branch with the name of `branch`-input in local and remote repository, if it doesn't exist yet.
|
||||
default: false
|
||||
internal_git_binary:
|
||||
description: Internal use only. Path git binary that should be used.
|
||||
default: git
|
||||
|
||||
outputs:
|
||||
changes_detected:
|
||||
|
|
|
@ -7,6 +7,8 @@ if "$INPUT_DISABLE_GLOBBING"; then
|
|||
fi
|
||||
|
||||
_main() {
|
||||
_check_if_git_is_available
|
||||
|
||||
_switch_to_repository
|
||||
|
||||
if _git_is_dirty || "$INPUT_SKIP_DIRTY_CHECK"; then
|
||||
|
@ -42,6 +44,11 @@ _main() {
|
|||
fi
|
||||
}
|
||||
|
||||
_check_if_git_is_available() {
|
||||
PATH_TO_GIT=$(which $INPUT_INTERNAL_GIT_BINARY);
|
||||
|
||||
echo "::debug::Path to git binary ${PATH_TO_GIT}";
|
||||
}
|
||||
|
||||
_switch_to_repository() {
|
||||
echo "INPUT_REPOSITORY value: $INPUT_REPOSITORY";
|
||||
|
|
Loading…
Reference in New Issue