mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2025-01-10 09:09:00 -07:00
Fix target branch creation
This commit is contained in:
parent
4f6fb412f1
commit
4caaae456b
|
@ -69,9 +69,7 @@ git config --global --add safe.directory /github/workspace
|
||||||
|
|
||||||
if ! git clone --single-branch --depth 1 --branch "$TARGET_BRANCH" "$GIT_CMD_REPOSITORY" "$CLONE_DIR"; then
|
if ! git clone --single-branch --depth 1 --branch "$TARGET_BRANCH" "$GIT_CMD_REPOSITORY" "$CLONE_DIR"; then
|
||||||
if ${CREATE_TARGET_BRANCH} && git clone --single-branch --depth 1 "$GIT_CMD_REPOSITORY" "$CLONE_DIR"; then
|
if ${CREATE_TARGET_BRANCH} && git clone --single-branch --depth 1 "$GIT_CMD_REPOSITORY" "$CLONE_DIR"; then
|
||||||
echo "[+] Creating branch ${TARGET_BRANCH}"
|
echo "[+] Creating target branch ${TARGET_BRANCH}"
|
||||||
git branch ${TARGET_BRANCH}
|
|
||||||
git switch ${TARGET_BRANCH}
|
|
||||||
else
|
else
|
||||||
echo "::error::Could not clone the destination repository. Command:"
|
echo "::error::Could not clone the destination repository. Command:"
|
||||||
echo "::error::git clone --single-branch --branch $TARGET_BRANCH $GIT_CMD_REPOSITORY $CLONE_DIR"
|
echo "::error::git clone --single-branch --branch $TARGET_BRANCH $GIT_CMD_REPOSITORY $CLONE_DIR"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user