Skip to content

Commit 4fca65b

Browse files
authored
Update entrypoint.sh
1 parent d9c76b7 commit 4fca65b

File tree

1 file changed

+8
-25
lines changed

1 file changed

+8
-25
lines changed

entrypoint.sh

+8-25
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ set -e
44

55
echo
66
echo " 'Nightly Merge Action' is using the following input:"
7-
echo " - stable_branch = '$INPUT_STABLE_BRANCH'"
8-
echo " - development_branch = '$INPUT_DEVELOPMENT_BRANCH'"
7+
echo " - source_branch = '$SOURCE_BRANCH'"
8+
echo " - target_branch = '$TARGET_BRANCH'"
99
echo " - allow_ff = $INPUT_ALLOW_FF"
1010
echo " - allow_git_lfs = $INPUT_GIT_LFS"
1111
echo " - ff_only = $INPUT_FF_ONLY"
@@ -49,31 +49,14 @@ git config --global user.email "$INPUT_USER_EMAIL"
4949

5050
set -o xtrace
5151

52-
git fetch origin $INPUT_STABLE_BRANCH
53-
git checkout -b $INPUT_STABLE_BRANCH origin/$INPUT_STABLE_BRANCH
52+
git clone github.com/CumulusNetworks/docs
53+
cd docs
54+
git checkout $TARGET_BRANCH
5455

55-
git fetch origin $INPUT_DEVELOPMENT_BRANCH
56-
git checkout -b $INPUT_DEVELOPMENT_BRANCH origin/$INPUT_DEVELOPMENT_BRANCH
57-
58-
if git merge-base --is-ancestor $INPUT_STABLE_BRANCH $INPUT_DEVELOPMENT_BRANCH; then
59-
echo "No merge is necessary"
60-
exit 0
61-
fi;
62-
63-
set +o xtrace
64-
echo
65-
echo " 'Nightly Merge Action' is trying to merge the '$INPUT_STABLE_BRANCH' branch ($(git log -1 --pretty=%H $INPUT_STABLE_BRANCH))"
66-
echo " into the '$INPUT_DEVELOPMENT_BRANCH' branch ($(git log -1 --pretty=%H $INPUT_DEVELOPMENT_BRANCH))"
67-
echo
68-
set -o xtrace
56+
git fetch
6957

7058
# Do the merge
71-
git merge $FF_MODE --no-edit $INPUT_STABLE_BRANCH
72-
73-
# Pull lfs if enabled
74-
if $INPUT_GIT_LFS; then
75-
git lfs pull
76-
fi
59+
git merge origin/$SOURCE_BRANCH
7760

7861
# Push the branch
79-
git push origin $INPUT_DEVELOPMENT_BRANCH
62+
git push

0 commit comments

Comments
 (0)