mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2024-11-06 02:08:05 +00:00
Revert "Creating orphan branch"
This commit is contained in:
parent
d51384f592
commit
b3fc6f8a17
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
set -x
|
|
||||||
|
|
||||||
_main() {
|
_main() {
|
||||||
_switch_to_repository
|
_switch_to_repository
|
||||||
@ -40,13 +39,8 @@ _git_is_dirty() {
|
|||||||
_switch_to_branch() {
|
_switch_to_branch() {
|
||||||
echo "INPUT_BRANCH value: $INPUT_BRANCH";
|
echo "INPUT_BRANCH value: $INPUT_BRANCH";
|
||||||
|
|
||||||
if git show-ref --verify --quiet refs/heads/$INPUT_BRANCH; then
|
|
||||||
# Switch to branch from current Workflow run
|
# Switch to branch from current Workflow run
|
||||||
git checkout $INPUT_BRANCH;
|
git checkout $INPUT_BRANCH;
|
||||||
else
|
|
||||||
git checkout --orphan $INPUT_BRANCH
|
|
||||||
git rm -rf .
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_add_files() {
|
_add_files() {
|
||||||
|
Loading…
Reference in New Issue
Block a user