mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2024-12-06 02:09:04 +00:00
Add checkout_options
This commit is contained in:
parent
6456430b6b
commit
0ee9fb7263
@ -44,6 +44,10 @@ inputs:
|
|||||||
description: Push options (eg. --force)
|
description: Push options (eg. --force)
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
checkout_options:
|
||||||
|
description: Checkout options (eg. --branch)
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
skip_dirty_check:
|
skip_dirty_check:
|
||||||
description: Skip the check if the git repository is dirty and always try to create a commit.
|
description: Skip the check if the git repository is dirty and always try to create a commit.
|
||||||
required: false
|
required: false
|
||||||
|
@ -42,8 +42,11 @@ _switch_to_branch() {
|
|||||||
# Fetch remote to make sure that repo can be switched to the right branch.
|
# Fetch remote to make sure that repo can be switched to the right branch.
|
||||||
git fetch;
|
git fetch;
|
||||||
|
|
||||||
|
# shellcheck disable=SC2206
|
||||||
|
INPUT_CHECKOUT_OPTIONS_ARRAY=( $INPUT_CHECKOUT_OPTIONS );
|
||||||
|
|
||||||
# Switch to branch from current Workflow run
|
# Switch to branch from current Workflow run
|
||||||
git checkout "$INPUT_BRANCH" --;
|
git checkout ${INPUT_CHECKOUT_OPTIONS:+"${INPUT_CHECKOUT_OPTIONS_ARRAY[@]}"} "$INPUT_BRANCH" --;
|
||||||
}
|
}
|
||||||
|
|
||||||
_add_files() {
|
_add_files() {
|
||||||
|
Loading…
Reference in New Issue
Block a user