Add skip_checkout option

This commit is contained in:
Chris Buckley
2022-01-10 00:10:05 +00:00
parent 8c3ed373fb
commit fc174e2406
4 changed files with 28 additions and 3 deletions

View File

@@ -55,9 +55,13 @@ _switch_to_branch() {
git fetch --depth=1;
fi
# Switch to branch from current Workflow run
# shellcheck disable=SC2086
git checkout $INPUT_BRANCH;
if "$INPUT_SKIP_CHECKOUT"; then
echo "::debug::git-checkout has not been executed";
else
# Switch to branch from current Workflow run
# shellcheck disable=SC2086
git checkout $INPUT_BRANCH;
fi
}
_add_files() {